time

Module duration

Source
Expand description

The Duration struct and its associated impls.

Macrosยง

duration_mul_div_int ๐Ÿ”’
Implement Mul (reflexively) and Div for Duration for various types.
try_from_secs ๐Ÿ”’
This is adapted from the std implementation, which uses mostly bit operations to ensure the highest precision:

Structsยง

Duration
A span of time with nanosecond precision.

Enumsยง

Padding ๐Ÿ”’
By explicitly inserting this enum where padding is expected, the compiler is able to better perform niche value optimization.

Type Aliasesยง

Nanoseconds ๐Ÿ”’
The type of the nanosecond field of Duration.