Skip to main content

Module clock

Module clock 

Source

Structs§

FileClock
File-backed clock used by integration tests that run the daemon as a child process. Advancing the integer timestamp in the file wakes pending timers.
LocalTime
A timestamp’s local wall-clock fields. History views render times the way an operator reads a clock, so they need the local date as well as the local time: a span that crosses midnight has to widen from HH:MM to a dated form, and only the calendar day can tell them that.
SystemClock

Traits§

Clock

Functions§

format_timestamp
local_time
Breaks a millisecond timestamp into local wall-clock fields. Uses the same localtime_r path as local_minute so scheduling and rendering agree on what “local” means, including across DST.
next_local_minute_ms
Finds the next real instant whose local wall clock matches minute. Starting at the next whole minute makes the current minute mean its next occurrence, while scanning real instants handles DST transitions.
parse_timestamp
Reads an RFC3339 timestamp back to milliseconds since the epoch — the inverse of format_timestamp, for renderings that hold only the envelope’s string form and need to do arithmetic on it.