AceTime
0.5
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.
|
Base class for objects that provide a source of time whose time cannot be changed by the end-user. More...
#include <TimeProvider.h>
Public Member Functions | |
virtual | ~TimeProvider () |
Virtual destructor. More... | |
virtual acetime_t | getNow () const =0 |
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z). More... | |
virtual void | sendRequest () const |
Send a time request asynchronously. More... | |
virtual bool | isResponseReady () const |
Return true if a response is ready. More... | |
virtual acetime_t | readResponse () const |
Returns number of seconds since AceTime epoch (2000-01-01). More... | |
Static Public Attributes | |
static const acetime_t | kInvalidSeconds = LocalTime::kInvalidSeconds |
Base class for objects that provide a source of time whose time cannot be changed by the end-user.
For example, an NTP client, or a GPS module.
Definition at line 20 of file TimeProvider.h.
|
inlinevirtual |
|
pure virtual |
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z).
Returns kInvalidSeconds if an error has occured.
Implemented in ace_time::clock::SystemClock.
|
inlinevirtual |
Return true if a response is ready.
Used by SystemClockSyncCoroutine.
Definition at line 37 of file TimeProvider.h.
|
inlinevirtual |
Returns number of seconds since AceTime epoch (2000-01-01).
Return kInvalidSeconds if there is an error. Valid only if isResponseReady() returns true. Used by SystemClockSyncCoroutine.
Definition at line 44 of file TimeProvider.h.
|
inlinevirtual |
Send a time request asynchronously.
Used by SystemClockSyncCoroutine.
Definition at line 34 of file TimeProvider.h.