hermit::syscalls

Function sys_clock_gettime

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

Get the current time of a clock.

Get the current time of the clock with clock_id and stores result in parameter res. Returns 0 on success, -EINVAL otherwise.

Supported clocks:

  • CLOCK_REALTIME
  • CLOCK_MONOTONIC