Polycode
|
A timer that dispatches trigger events. More...
Inherits Polycode::EventDispatcher.
Public Member Functions | |
Timer (bool triggerMode, int msecs) | |
Creates a new timer. | |
void | Pause (bool paused) |
Pauses and resumes the timer. | |
bool | isPaused () |
Returns true if the timer is paused. | |
void | Reset () |
Resets the timer. | |
Number | getElapsedf () |
Returns the time elapsed in floating point microseconds. |
A timer that dispatches trigger events.
Timer::Timer | ( | bool | triggerMode, |
int | msecs | ||
) |
Creates a new timer.
triggerMode | If true, will dispatch an event at the specified frequency, otherwise it will simply count time. You normally want this to be true. |
msecs | Timer frequency in milliseconds. |
void Timer::Pause | ( | bool | paused | ) |
Pauses and resumes the timer.
paused | If true, pauses the timer, otherwise resumes it. |