Skip to main content

boottime_ns

Function boottime_ns 

Source
pub fn boottime_ns() -> u64
Expand description

Returns the current CLOCK_BOOTTIME value in nanoseconds.

CLOCK_BOOTTIME counts from kernel boot and includes time spent in suspend, making it ideal for measuring total time since the VM kernel started.

ยงPanics

Panics if clock_gettime fails, which should never happen for CLOCK_BOOTTIME.