Because the timer has a thread-safe interface, the shared_ptr to the timer is const, and the task is setup is ensured in a dedicated create function there is no need for synchronization primitives when using the timer itself.
| 63 | // Because the timer has a thread-safe interface, the shared_ptr to the timer is const, and the task is setup is ensured |
| 64 | // in a dedicated create function there is no need for synchronization primitives when using the timer itself. |
| 65 | void start() { timer_->start(); } |
| 66 | void stop() { timer_->stop(); } |
| 67 | |
| 68 | std::atomic<uint32_t> counter_{0}; |