Function nc::clock_getres [−][src]
pub fn clock_getres(
which_clock: clockid_t,
tp: &mut timespec_t
) -> Result<(), Errno>
Expand description
Get resolution(precision) of the specific clock.
let mut tp = nc::timespec_t::default(); let ret = nc::clock_getres(nc::CLOCK_BOOTTIME, &mut tp); assert!(ret.is_ok()); assert!(tp.tv_nsec > 0);