Return to Index
Timer
A timer class that provides evenly spaced timeout events to an
application. The timeout period is specified in seconds using
a floating point value for fractional parts of seconds. A timer
can be a one-time timeout or can timeout repeatedly.
Object Events:
Timeout | An event generated when the timeout happens. |
Timer::Timer |
Timer::Timer();
Constructs a new timer. |
void Timer::setOnlyOnce |
void Timer::setOnlyOnce(bool once);
Sets whether the timeout happens once or repeatedly, and starts the timer. |
Parameters: |
bool | once | True for single timeout, false for repeated ones. |
|
void Timer::setTimeout |
void Timer::setTimeout(double pSecs);
Sets the timeout period and starts the timer. |
Parameters: |
double | pSecs | The timeout in seconds. |
|
bool Timer::getOnlyOnce |
bool Timer::getOnlyOnce();
Returns whether the timer is a single-shot type or not. |
double Timer::getTimeout |
double Timer::getTimeout();
Returns whether the timeout value in seconds |
void Timer::start |
void Timer::start(double secs, bool once);
Starts the timer with the specified values. |
Parameters: |
double | secs | The timeout in seconds. |
bool | once | Whether to cause a single timeout or repeated ones. |
|
void Timer::stop |
void Timer::stop();
Stops the timer. |
bool Timer::isRunning |
bool Timer::isRunning();
Returns whether the timer is currently running. |
Generated automatically by docgen 0.0.1
© 2003 Aron Dobos