Skip to main content

Module time

Module time 

Source
Expand description

Clocks, timestamps, and high-resolution sleep syscalls.

Structs§

Timespec
Seconds and nanoseconds timestamp matching the 64-bit kernel struct timespec.
Timeval
Seconds and microseconds timestamp matching the 64-bit kernel struct timeval.

Constants§

CLOCK_MONOTONIC
Monotonic clock identifier (cannot jump backwards).
CLOCK_REALTIME
System-wide real-time clock identifier.
TIMER_ABSTIME
Flag indicating an absolute target time for clock_nanosleep.

Functions§

clock_gettime
Queries the current value of clock_id.
clock_gettime_syscall
Queries the current value of clock_id via the CLOCK_GETTIME syscall.
clock_settime
Sets the time of clock_id to ts.
nanosleep
Sleeps for the relative interval req on CLOCK_MONOTONIC, optionally writing any remaining duration into rem if interrupted.