ClanLib
2.3.7
|
Timer class that invokes a callback on a specified interval. More...
#include <timer.h>
Public Member Functions | |
Construction | |
CL_Timer () | |
Creates a timer object. More... | |
virtual | ~CL_Timer () |
Destroys the timer object. More... | |
bool | is_repeating () const |
Returns true if the timer repeats until it is stopped. More... | |
unsigned int | get_timeout () const |
Returns the current timeout. In milliseconds. More... | |
Events | |
CL_Callback_v0 & | func_expired () |
Callback invoked every time the timer interval occurs. More... | |
Operations | |
void | start (unsigned int timeout, bool repeat=true) |
Starts the timer. Timeout in milliseconds. More... | |
void | stop () |
Stop the timer. More... | |
Timer class that invokes a callback on a specified interval.
CL_Timer::CL_Timer | ( | ) |
Creates a timer object.
|
virtual |
Destroys the timer object.
CL_Callback_v0& CL_Timer::func_expired | ( | ) |
Callback invoked every time the timer interval occurs.
unsigned int CL_Timer::get_timeout | ( | ) | const |
Returns the current timeout. In milliseconds.
bool CL_Timer::is_repeating | ( | ) | const |
Returns true if the timer repeats until it is stopped.
void CL_Timer::start | ( | unsigned int | timeout, |
bool | repeat = true |
||
) |
Starts the timer. Timeout in milliseconds.
void CL_Timer::stop | ( | ) |
Stop the timer.