SDL::StopWatch - A stopwatch using SDL::LCD
# create the stopwatch watch = new ['SDL'; 'StopWatch'], screen # set its position watch.'xpos'( 5 ) watch.'ypos'( 5 ) # start it watch.'start'()
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.
An SDL::StopWatch object has the following methods:
Creates a StopWatch object.
The stopwatch will be drawn onto the specified screen.
Resets the stopwatch.
Starts the stopwatch.
Stops the stopwatch.
Returns the measured time, multiplied by the reciprocal of the precision value.
Updates the stopwatch and draws it.
It is drawn onto the screen consigned to the constructor.
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 (C) 2004-2008, Parrot Foundation.