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