The options of timer.
More...
#include <timer.h>
◆ TimerOption() [1/2]
apollo::cyber::TimerOption::TimerOption |
( |
uint32_t |
period, |
|
|
std::function< void()> |
callback, |
|
|
bool |
oneshot |
|
) |
| |
|
inline |
Construct a new Timer Option object.
- Parameters
-
period | The period of the timer, unit is ms |
callback | The task that the timer needs to perform |
oneshot | Oneshot or period |
◆ TimerOption() [2/2]
apollo::cyber::TimerOption::TimerOption |
( |
| ) |
|
|
inline |
Default constructor for initializer list.
◆ callback
std::function<void()> apollo::cyber::TimerOption::callback |
The task that the timer needs to perform
◆ oneshot
bool apollo::cyber::TimerOption::oneshot |
True: perform the callback only after the first timing cycle False: perform the callback every timed period
◆ period
uint32_t apollo::cyber::TimerOption::period = 0 |
The period of the timer, unit is ms max: 512 * 64 min: 1.
The documentation for this struct was generated from the following file: