1 #ifndef ACE_TIME_SYSTEM_TIME_HEARTBEAT_COROUTINE_H 2 #define ACE_TIME_SYSTEM_TIME_HEARTBEAT_COROUTINE_H 5 #include "SystemTimeKeeper.h" 26 uint16_t heartbeatPeriodMillis = 5000):
27 mSystemTimeKeeper(systemTimeKeeper),
28 mHeartbeatPeriodMillis(heartbeatPeriodMillis) {}
30 int runCoroutine()
override {
32 mSystemTimeKeeper.
getNow();
33 COROUTINE_DELAY(mHeartbeatPeriodMillis);
39 uint16_t
const mHeartbeatPeriodMillis;
A coroutine that calls SystemTimeKeeper.getNow() peridically.
A TimeKeeper that uses the Arduino millis() function to advance the time returned to the user...
SystemTimeHeartbeatCoroutine(SystemTimeKeeper &systemTimeKeeper, uint16_t heartbeatPeriodMillis=5000)
Constructor.
acetime_t getNow() const override
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z).