17#ifndef PROTOCORE_NTP_SERVICE_H
18#define PROTOCORE_NTP_SERVICE_H
37bool pc_ntp_begin(
const char *tz =
nullptr,
const char *server1 =
"pool.ntp.org",
38 const char *server2 =
"time.nist.gov");
void pc_ntp_set_test_epoch(time_t epoch)
size_t pc_ntp_http_date(char *out, size_t out_cap)
Format the current time as an RFC 7231 IMF-fixdate (HTTP Date).
uint32_t pc_ntp_time_source(void)
NTP as a time source for the multi-source registry (services/timing_position/time_source).
time_t pc_ntp_epoch()
Current Unix epoch seconds, or 0 if not yet synced (or disabled).
bool pc_ntp_synced()
True once a plausible wall-clock time has been obtained from SNTP.
bool pc_ntp_begin(const char *tz=nullptr, const char *server1="pool.ntp.org", const char *server2="time.nist.gov")
Start the SNTP client.
User-facing configuration for ProtoCore.