AceTimeClock
1.0.3
Clock classes for Arduino that can synchronize from an NTP server or an RTC chip
|
6 #ifndef ACE_TIME_CLOCK_H
7 #define ACE_TIME_CLOCK_H
45 virtual acetime_t
getNow()
const = 0;
Clock()=default
Default constructor.
virtual acetime_t getNow() const =0
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z).
virtual void sendRequest() const
Send a time request asynchronously.
virtual void setNow(acetime_t)
Set the time to the indicated seconds.
~Clock()=default
We deliberately avoid using a virtual destructor.
Abstract base class for objects that provide and store time.
static const acetime_t kInvalidSeconds
Error value returned by getNow() and other methods when this object is not yet initialized.
virtual bool isResponseReady() const
Return true if a response is ready.
virtual acetime_t readResponse() const
Returns number of seconds since AceTime epoch (2000-01-01).