Manages a thread which calls a specified function at a specified interval.
More...
|
| CallbackTimer ()=default |
| Default constructor.
|
|
| CallbackTimer (CallbackTimer &&)=delete |
| Move constructor.
|
|
| CallbackTimer (const CallbackTimer &)=delete |
| Copy constructor.
|
|
bool | is_running () const noexcept |
| Checks if the timer is currently running.
|
|
CallbackTimer & | operator= (CallbackTimer &&)=delete |
| Move assignment operator.
|
|
CallbackTimer & | operator= (const CallbackTimer &)=delete |
| Copy assignment operator.
|
|
void | setInterval (int interval) |
| Set the Interval of the timer.
|
|
void | start (int interval, const std::function< void(void *)> &func, void *userData) |
| Starts the timer.
|
|
void | stop () |
| Stops the Timer.
|
|
| ~CallbackTimer () |
| Destructor.
|
|
Manages a thread which calls a specified function at a specified interval.
◆ is_running()
bool CallbackTimer::is_running |
( |
| ) |
const |
|
noexcept |
Checks if the timer is currently running.
- Returns
- True if the timer is running
◆ setInterval()
void CallbackTimer::setInterval |
( |
int | interval | ) |
|
Set the Interval of the timer.
- Parameters
-
[in] | interval | Interval in [ms] when to trigger the callback |
◆ start()
void CallbackTimer::start |
( |
int | interval, |
|
|
const std::function< void(void *)> & | func, |
|
|
void * | userData ) |
Starts the timer.
- Parameters
-
[in] | interval | Interval in [ms] when to trigger the callback |
[in] | func | Function to call |
[in,out] | userData | User Data which will be passed to the callback function |
The documentation for this class was generated from the following file: