Available on crate feature
time only.Expand description
Time-related operations.
Structs§
- Itimerspec
struct itimerspecfor use withtimerfd_gettimeandtimerfd_settime.- Timerfd
Flags linux_kernelor FreeBSD or Fuchsia or illumos or NetBSD TFD_*flags for use withtimerfd_create.- Timerfd
Timer Flags linux_kernelor FreeBSD or Fuchsia or illumos or NetBSD TFD_TIMER_*flags for use withtimerfd_settime.- Timespec
event, orfs, orprocess, orruntime, orthread, ortime, orlinux_rawand non-use-explicitly-provided-auxvand non-use-libc-auxvand (x86 orparamorprocessorruntimeortime), oreventand (bsdorlinux_kernelor WASI or Windows) struct timespec—A quantity of time in seconds plus nanoseconds.
Enums§
- ClockId
( threadortime) and neitherapplenor WASI and neither ESP-IDF nor Windows and non-WASI clockid_tCLOCK_*constants for use withclock_gettime.- Dynamic
Clock Id ( threadortime) and neither ESP-IDF nor Windows and non-WASI clockid_tCLOCK_*constants for use withclock_gettime_dynamic.- Timerfd
Clock Id linux_kernelor FreeBSD or Fuchsia or illumos or NetBSD CLOCK_*constants for use withtimerfd_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_gettimebut 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, orlinux_raw, or 32-bit andlibcand x86-64) and (event, orfs, orprocess, orruntime, orthread, ortime, orlinux_rawand non-use-explicitly-provided-auxvand non-use-libc-auxvand (x86 orparamorprocessorruntimeortime), oreventand (bsdorlinux_kernelor WASI or Windows)) - A type for the
tv_nsecfield ofTimespec. - Secs
event, orfs, orprocess, orruntime, orthread, ortime, orlinux_rawand non-use-explicitly-provided-auxvand non-use-libc-auxvand (x86 orparamorprocessorruntimeortime), oreventand (bsdorlinux_kernelor WASI or Windows) - A type for the
tv_secfield ofTimespec.