Skip to main content

epoch_secs_monotonic

Function epoch_secs_monotonic 

Source
pub fn epoch_secs_monotonic(ctx: &ServiceContext) -> i64
Expand description

Seconds that never go backwards (InspectKernel query 17).

For stamping a sequence of events where ordering matters more than absolute accuracy. The origin depends on the board: on x86 it is the CMOS RTC’s epoch seconds with backward and wild-forward readings dropped; on the boards with no RTC (the Pis, the VisionFive) it is seconds since boot. Use it for differences, never as a date.