|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Which clock the HTTP Date header reads, and the IMF-fixdate it renders.
More...
#include "protocore_config.h"Go to the source code of this file.
Which clock the HTTP Date header reads, and the IMF-fixdate it renders.
One decision in one place: a build with the multi-source time registry takes the epoch from protocore_time_now(), a build with only the NTP client takes it from that, and a build with neither has no wall clock and emits no Date at all. ::HttpDate does the rendering; this module says what instant to render and holds the result until the caller has copied it.
It exists because that decision used to live in two escape hatches - protocore_time_http_date in time_source and protocore_ntp_http_date in ntp_service - each defined OUTSIDE its own module's enable gate so response.c could call it either way. That is what kept both modules in every binary: gen_modules.py reads a module's gate off its own source, and a file with code outside its gate has no gate to read, so CMake adds it to every target and its symbols are reachable from translation units that never asked for a clock. With the sometimes-used part isolated here, behind one consumer, both clocks are gated for real.
Definition in file http_clock.h.