AceTime
0.1
Date and time classes for Arduino that supports the TZ DAtabase, and a system clock synchronized from an NTP server or an RTC chip.
|
A class that periodically that syncs the SystemTimeKeeper with its syncTimeProvider. More...
#include <SystemTimeSyncLoop.h>
Public Member Functions | |
SystemTimeSyncLoop (SystemTimeKeeper &systemTimeKeeper, uint16_t syncPeriodSeconds=3600, uint16_t initialSyncPeriodSeconds=5, uint16_t requestTimeoutMillis=1000) | |
Constructor. More... | |
void | loop () |
If AceRoutine coroutine infrastructure is not used, then call this from the global loop() method. | |
uint16_t | getSecondsSinceLastSync () const |
Return the number of seconds since last sync. More... | |
A class that periodically that syncs the SystemTimeKeeper with its syncTimeProvider.
Definition at line 14 of file SystemTimeSyncLoop.h.
|
inline |
Constructor.
systemTimeKeeper | the system time keeper to sync up |
syncPeriodSeconds | seconds between normal sync attempts (default 3600) |
initialSyncPeriodSeconds | seconds between sync attempts when the systemTimeKeeper is not initialized (default 5) |
requestTimeoutMillis | number of milliseconds before the request to syncTimeProvider times out |
Definition at line 27 of file SystemTimeSyncLoop.h.
|
inline |
Return the number of seconds since last sync.
Mostly for debugging purposes.
Definition at line 71 of file SystemTimeSyncLoop.h.