AceTimeClock
1.0.4
Clock classes for Arduino that can synchronize from an NTP server or an RTC chip
|
6 #ifndef ACE_TIME_ESP_SNTP_CLOCK_H
7 #define ACE_TIME_ESP_SNTP_CLOCK_H
9 #if defined(ESP8266) || defined(ESP32)
51 return time(
nullptr) - LocalDate::kSecondsSinceUnixEpoch;
static const uint32_t kDefaultTimeoutMillis
Default time out for setup().
static const char kDefaultNtpServer[]
Default NTP server, "pool.ntp.org".
bool setup(const char *ntpServer=kDefaultNtpServer, uint32_t timeoutMillis=kDefaultTimeoutMillis)
Setup the SNTP client.
An implementation of Clock that configures the built-in SNTP client on the ESP8266 and ESP32 using th...
Abstract base class for objects that provide and store time.
acetime_t getNow() const override
Return the number of seconds since the AceTime epoch (2000-01-01T00:00:00Z).