Function clock_gettime
pub unsafe fn clock_gettime(
which_clock: i32,
tp: &mut timespec_t,
) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Get time of specific clock.
§Examples
let mut tp = nc::timespec_t::default();
let ret = unsafe { nc::clock_gettime(nc::CLOCK_REALTIME_COARSE, &mut tp) };
assert!(ret.is_ok());
assert!(tp.tv_sec > 0);