Skip to main content

Module time

Module time 

Source
Expand description

Time helpers.

Wall-clock time is used for display and record timestamps; ordering decisions inside a session always use the per-session sequence number, never the wall clock (clock skew must not corrupt event-chain order — silent-error class D13.6 in the plan).

Functions§

elapsed_us
Elapsed microseconds since started, saturating at u64::MAX if a caller somehow measures longer than ~585 000 years.
iso8601_ms
RFC 3339 / ISO-8601 UTC timestamp with millisecond precision, e.g. 2026-08-10T17:03:05.123Z. Hand-rolled civil-from-days conversion so we avoid a chrono dependency in the core crate.
now_iso8601
Current time as ISO-8601 UTC.
now_ms
Milliseconds since the Unix epoch. Saturates at 0 if the system clock is before the epoch (never panics).