hermit::syscalls

Function sys_clock_getres

Source
#[no_mangle]
pub unsafe extern "C" fn sys_clock_getres(
    clock_id: clockid_t,
    res: *mut timespec,
) -> i32
Expand description

Finds the resolution (or precision) of a clock.

This function gets the clock resolution of the clock with clock_id and stores it in parameter res. Returns 0 on success, -EINVAL otherwise.

Supported clocks:

  • CLOCK_REALTIME
  • CLOCK_PROCESS_CPUTIME_ID
  • CLOCK_THREAD_CPUTIME_ID
  • CLOCK_MONOTONIC