25#ifndef PROTOCORE_TIME_SOURCE_H
26#define PROTOCORE_TIME_SOURCE_H
User-facing configuration for ProtoCore.
bool pc_time_source_add(const char *name, uint8_t priority, TimeSourceFn fn)
Register a time source.
uint32_t pc_time_now(void)
Current best time.
uint32_t(* TimeSourceFn)(void)
A time source: returns the current Unix epoch seconds for this source, or 0 if it currently has no va...
void pc_time_source_reset(void)
Clear all registered sources.
const char * pc_time_source_active(void)
Name of the source that satisfied the last pc_time_now(), or nullptr.
size_t pc_time_http_date(char *out, size_t out_cap)
The current best time (pc_time_now, any registered NTP / GPS / RTC / ... source) formatted as an RFC ...