Module time

Source
Expand description

Time and calendar types and operations.

Extends: std::{time}


Structs§

Duration
core A span of time, with u64 seconds and u32 nanoseconds.
DurationErrorTryFromFloatSecs
🚩 core Error returned from converting floating-point seconds into a Duration.
SystemInstantstd
std A measurement of a monotonically nondecreasing clock.
SystemTimestd
std A measurement of the system clock.
SystemTimeErrorstd
🚩 Returned from the duration_since and elapsed methods on SystemTime.
TimeDelta
A signed duration of time, stored as an (i64, i32) pair of seconds and nanoseconds.
TimeSplittime
A full time split from years to nanoseconds.
Timecodetime
Timecode splitting and formatting.
UnixTimeI64time
64-bit Unix time, supporting negative values.
UnixTimeU32time
32-bit Unix time, supporting only non-negative values.

Enums§

Month
The months of the year.
TimeErrorerror and time
🚩+ A text-related composite error.
Weekday
The days of the week.

Constants§

UNIX_EPOCHstd
std A SystemTime anchored to “1970-01-01 00:00:00 UTC”.

Functions§

is_leap_yeartime
Returns true if the provided year is a leap year.

Type Aliases§

NoTimetime
Represents the absence of time.
TimeInstant
A measurement of a monotonically nondecreasing clock.
TimeResulterror and time
⚖️ A text-related result.
TimeSplitHourNanotime
A time split from hours to nanoseconds.
TimeSplitHourNanoNormtime
A time split from hours to seconds, normalized (128b size & payload).
TimeSplitHourSectime
A time split from hours to seconds.
TimeSplitHourSecNormtime
A time split from hours to seconds, normalized (128b size, 80b payload).
TimeSplitMilliNanotime
A time split from milliseconds to nanoseconds.
TimeSplitMilliNanoNormtime
A time split from milliseconds to nanoseconds, normalized (48b size & payload).
TimeSplitNormtime
A time split from years to nanoseconds, normalized (192b size, 152b payload).
TimeSplitYearDaytime
A time split from years to days.
TimeSplitYearDayNormtime
A time split from years to days, normalized (128b size, 80b payload).
TimeSplitYearSectime
A time split from years to seconds.
TimeSplitYearSecNormtime
A time split from years to seconds, normalized (128b size, 104b payload).