Skip to main content

Module time

Module time 

Source
Expand description

Time helpers used across the engine. Centralised so the same SystemTime::now().duration_since(UNIX_EPOCH).unwrap_or_default() incantation doesn’t get re-typed at 20+ call sites.

Functions§

now_unix_millis
Current wall-clock unix milliseconds. 0 if the system clock is before the epoch (impossible on real hardware, but the API returns a Result so we degrade gracefully instead of panicking).
now_unix_nanos
Current wall-clock unix nanoseconds.
now_unix_secs
Current wall-clock unix seconds.