Module time

Module time 

Source
Available on crate feature time only.
Expand description

Time-related operations.

Structs§

Itimerspeclinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
struct itimerspec for use with timerfd_gettime and timerfd_settime.
TimerfdFlags
TFD_* flags for use with timerfd_create.
TimerfdTimerFlags
TFD_TIMER_* flags for use with timerfd_settime.
Timespec
struct timespec—A quantity of time in seconds plus nanoseconds.

Enums§

ClockIdNon-WASI
clockid_t CLOCK_* constants for use with clock_gettime.
DynamicClockIdNon-WASI
clockid_t CLOCK_* constants for use with clock_gettime_dynamic.
TimerfdClockId
CLOCK_* constants for use with timerfd_create.

Functions§

clock_getresNeither Redox nor WASI
clock_getres(id)—Returns the resolution of a clock.
clock_gettimeNon-WASI
clock_gettime(id)—Returns the current value of a clock.
clock_gettime_dynamicNon-WASI
Like clock_gettime but with support for dynamic clocks.
clock_settimeNeither Redox, nor WASI, nor apple and non-macOS
clock_settime(id, timespec)—Sets the current value of a settable clock.
timerfd_createlinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
timerfd_create(clockid, flags)—Create a timer.
timerfd_gettimelinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
timerfd_gettime(clockid, flags)—Query a timer.
timerfd_settimelinux_kernel or FreeBSD or Fuchsia or illumos or NetBSD
timerfd_settime(clockid, flags, new_value)—Set the time on a timer.

Type Aliases§

Nsecs
A type for the tv_nsec field of Timespec.
Secs
A type for the tv_sec field of Timespec.