NAME ^

SDL::StopWatch - A stopwatch using SDL::LCD

SYNOPSIS ^

    # create the stopwatch
    watch = new 'SDL::StopWatch', screen

    # set its position
    watch.'xpos'( 5 )
    watch.'ypos'( 5 )

    # start it
    watch.'start'()

DESCRIPTION ^

You can start, stop and reset this stopwatch. You do not need to draw it while it is running, this is done by an internal timer.

METHODS ^

An SDL::StopWatch object has the following methods:

__init( screen )

Creates a StopWatch object.

The stopwatch will be drawn onto the specified screen.

reset()

Resets the stopwatch.

start()

Starts the stopwatch.

stop()

Stops the stopwatch.

current_time()

Returns the measured time, multiplied by the reciprocal of the precision value.

draw()

Updates the stopwatch and draws it.

It is drawn onto the screen consigned to the constructor.

AUTHOR ^

Jens Rieks <parrot at jensbeimsurfen dot de> is the author and maintainer. Please send patches and suggestions to the Perl 6 Internals mailing list.

COPYRIGHT ^

Copyright (C) 2004-2008, The Perl Foundation.


parrot