Yage3D.net
 

yage.core.timer

Authors:
Eric Poggel

License:
LGPL v3

class Timer ;
A cross-platform, high-performance (microsecond) timing class.

Example:
 Timer a = new Timer(true);
 double b = a.get();		// b stores the current time.


this(bool start = false);
Initialize and start the Timer.

Timer clone ();


void pause ();
Stop the timer. When play() is called again, it will start from the time when it was paused.

bool paused ();
Is the Timer paused ?

void play ();
Start the timer.

void stop ();
Stop the timer and reset it to zero.

void setPauseAfter (double seconds = inf);
double getPauseAfter ();
Pause the timer when it reaches this amount. Must be between (inclusive) the arguments of setRange(min, max) or else it will be ignored. Use pauseAfter() with no arguments to clear pauseAfter.

void seek (double seconds);
Set the Timer.

double tell ();
Get the Timer's time in seconds.

void setRange (double min = cast(double)0, double max = inf);
Set the timer's roll-under and roll-over values. Provide no arguments to reset them to the defaults of 0 and infinity.

Params:
double min The timer will never be less than this value.
double max The timer will never be greater than this value and will rollover back to min after crossing it.

char[] toString ();


Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:27 2010