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