Function clock_gettime_safe

Source
pub fn clock_gettime_safe(clock_id: ClockId) -> Result<TimeSpec, ShmError>
Expand description

Read a specific view of time

This function wraps the clock_gettime() system call to conveniently return the current time tracked by a specific clock.

The clock_id is one of ClockId::CLOCK_REALTIME, ClockId::CLOCK_MONOTONIC, etc.