AceTime  0.5.1
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.
Public Member Functions | List of all members
ace_time::clock::TimeKeeper Class Referenceabstract

A TimeProvider whose time can be set by the end-user. More...

#include <TimeKeeper.h>

Inheritance diagram for ace_time::clock::TimeKeeper:
Inheritance graph
[legend]
Collaboration diagram for ace_time::clock::TimeKeeper:
Collaboration graph
[legend]

Public Member Functions

virtual void setNow (acetime_t epochSeconds)=0
 Set the time to the indicated seconds. More...
 
- Public Member Functions inherited from ace_time::clock::TimeProvider
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...
 

Additional Inherited Members

- Static Public Attributes inherited from ace_time::clock::TimeProvider
static const acetime_t kInvalidSeconds = LocalTime::kInvalidSeconds
 

Detailed Description

A TimeProvider whose time can be set by the end-user.

For example, an RTC chip.

Definition at line 19 of file TimeKeeper.h.

Member Function Documentation

◆ setNow()

virtual void ace_time::clock::TimeKeeper::setNow ( acetime_t  epochSeconds)
pure virtual

Set the time to the indicated seconds.

Calling with a value of kInvalidSeconds indicates an error condition, so the method should do nothing.

Implemented in ace_time::clock::SystemClock.


The documentation for this class was generated from the following file: