[go: up one dir, main page]

clock_nanosleep

Function clock_nanosleep 

Source
pub fn clock_nanosleep(
    clock_id: ClockId,
    flags: ClockNanosleepFlags,
    request: &TimeSpec,
) -> Result<TimeSpec>
Available on crate feature time and (linux_android or solarish or freebsdlike or NetBSD or target_os=hurd or target_os=aix) only.
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