AceTime
0.3
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
|
A class that periodically that syncs the SystemClock with its syncTimeProvider. More...
#include <SystemClockSyncLoop.h>
Public Member Functions | |
SystemClockSyncLoop (SystemClock &systemClock, 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 SystemClock with its syncTimeProvider.
Definition at line 14 of file SystemClockSyncLoop.h.
|
inline |
Constructor.
systemClock | the system time keeper to sync up |
syncPeriodSeconds | seconds between normal sync attempts (default 3600) |
initialSyncPeriodSeconds | seconds between sync attempts when the systemClock is not initialized (default 5) |
requestTimeoutMillis | number of milliseconds before the request to syncTimeProvider times out |
Definition at line 27 of file SystemClockSyncLoop.h.
|
inline |
Return the number of seconds since last sync.
Mostly for debugging purposes.
Definition at line 71 of file SystemClockSyncLoop.h.