Skip to main content

timespec_get

Function timespec_get 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn timespec_get( tp: *mut timespec, base: c_int, ) -> c_int
Expand description

ISO C equivalent to Sys::clock_gettime.

The main differences are that this function:

  • returns 0 on error and base on success
  • only mandates TIME_UTC as a base

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/timespec_get.html.