Skip to main content

Module time

Module time 

Source
Available on crate feature time only.
Expand description

Time-related operations.

Structs§

Itimerspec
struct itimerspec for use with timerfd_gettime and timerfd_settime.
TimerfdFlagslinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
TFD_* flags for use with timerfd_create.
TimerfdTimerFlagslinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
TFD_TIMER_* flags for use with timerfd_settime.
Timespecevent, or fs, or process, or runtime, or thread, or time, or linux_raw and non-use-explicitly-provided-auxv and non-use-libc-auxv and (x86 or param or process or runtime or time), or event and (bsd or linux_kernel or WASI or Windows)
struct timespec—A quantity of time in seconds plus nanoseconds.

Enums§

ClockId(thread or time) and neither apple nor WASI and neither ESP-IDF nor Windows and non-WASI
clockid_t CLOCK_* constants for use with clock_gettime.
DynamicClockId(thread or time) and neither ESP-IDF nor Windows and non-WASI
clockid_t CLOCK_* constants for use with clock_gettime_dynamic.
TimerfdClockIdlinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
CLOCK_* constants for use with timerfd_create.

Functions§

clock_getres
clock_getres(id)—Returns the resolution of a clock.
clock_gettime
clock_gettime(id)—Returns the current value of a clock.
clock_gettime_dynamic
Like clock_gettime but with support for dynamic clocks.
clock_settime
clock_settime(id, timespec)—Sets the current value of a settable clock.
timerfd_create
timerfd_create(clockid, flags)—Create a timer.
timerfd_gettime
timerfd_gettime(clockid, flags)—Query a timer.
timerfd_settime
timerfd_settime(clockid, flags, new_value)—Set the time on a timer.

Type Aliases§

Nsecs(fix_y2038, or linux_raw, or 32-bit and libc and x86-64) and (event, or fs, or process, or runtime, or thread, or time, or linux_raw and non-use-explicitly-provided-auxv and non-use-libc-auxv and (x86 or param or process or runtime or time), or event and (bsd or linux_kernel or WASI or Windows))
A type for the tv_nsec field of Timespec.
Secsevent, or fs, or process, or runtime, or thread, or time, or linux_raw and non-use-explicitly-provided-auxv and non-use-libc-auxv and (x86 or param or process or runtime or time), or event and (bsd or linux_kernel or WASI or Windows)
A type for the tv_sec field of Timespec.