Function nix::time::clock_nanosleep
source ยท pub fn clock_nanosleep(
clock_id: ClockId,
flags: ClockNanosleepFlags,
request: &TimeSpec,
) -> Result<TimeSpec>
Expand description
Suspend execution of this thread for the amount of time specified by request
and measured against the clock speficied by clock_id
.
If flags
is TIMER_ABSTIME
, this function will suspend
execution until the time value of clock_id reaches the absolute time specified by request
. If
a signal is caught by a signal-catching function, or a signal causes the process to terminate,
this sleep is interrrupted.
see also man 3 clock_nanosleep