Function nanosleep
pub unsafe fn nanosleep(
req: ×pec_t,
rem: Option<&mut timespec_t>,
) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
High resolution sleep.
§Examples
let t = nc::timespec_t {
tv_sec: 1,
tv_nsec: 0,
};
let ret = unsafe { nc::nanosleep(&t, None) };
assert!(ret.is_ok());