|
Apollo 10.0
自动驾驶开放平台
|
Used to perform oneshot or periodic timing tasks 更多...
#include <timer.h>
Public 成员函数 | |
| Timer () | |
| Timer (TimerOption opt) | |
| Construct a new Timer object | |
| Timer (uint32_t period, std::function< void()> callback, bool oneshot) | |
| Construct a new Timer object | |
| ~Timer () | |
| void | SetTimerOption (TimerOption opt) |
| Set the Timer Option object | |
| void | Start () |
| Start the timer | |
| void | Stop () |
| Stop the timer | |
| apollo::cyber::Timer::Timer | ( | ) |
|
explicit |
| apollo::cyber::Timer::Timer | ( | uint32_t | period, |
| std::function< void()> | callback, | ||
| bool | oneshot | ||
| ) |
Construct a new Timer object
| period | The period of the timer, unit is ms |
| callback | The tasks that the timer needs to perform |
| oneshot | True: perform the callback only after the first timing cycle False: perform the callback every timed period |
| apollo::cyber::Timer::~Timer | ( | ) |
| void apollo::cyber::Timer::SetTimerOption | ( | TimerOption | opt | ) |
| void apollo::cyber::Timer::Start | ( | ) |
Start the timer
| void apollo::cyber::Timer::Stop | ( | ) |
Stop the timer