Function rustix::time::clock_gettime
#[must_use]
pub fn clock_gettime(id: ClockId) -> Timespec
The portability is definied by:
#[cfg(any(linux_raw, all(libc, not(target_os = "wasi"))))]
Documentation
clock_gettime(id)
—Returns the current value of a clock.
This function uses ClockId
which only contains clocks which are known to
always be supported at runtime, allowing this function to be infallible.
For a greater set of clocks and dynamic clock support, see
clock_gettime_dynamic
.