|
SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
|
Simple timer for SPSP purposes. More...
#include <timer.hpp>
Public Member Functions | |
| Timer (const std::chrono::milliseconds interval, std::function< void()> cb) | |
| Constructs a new timer. More... | |
| ~Timer () | |
| Destroys the timer. More... | |
Protected Member Functions | |
| void | handlerThread () |
| Timer handler thread. More... | |
Simple timer for SPSP purposes.
(... but you can also use it outside of SPSP.)
| SPSP::Timer::Timer | ( | const std::chrono::milliseconds | interval, |
| std::function< void()> | cb | ||
| ) |
Constructs a new timer.
First execution of cb will be after first interval expires (not immediately).
| interval | Interval of timer |
| cb | Callback (std::bind can be used) |
| SPSP::Timer::~Timer | ( | ) |
Destroys the timer.
|
protected |
Timer handler thread.
1.8.17