Expand description
Time-related operations.
Structs§
- Duration
- A
Duration
type to represent a span of time, typically used for system timeouts.
Constants§
- MICROS_
PER_ SEC - Number of microseconds in a second.
- MILLIS_
PER_ SEC - Number of milliseconds in a second.
- NANOS_
PER_ MICROS - Number of nanoseconds in a microsecond.
- NANOS_
PER_ MILLIS - Number of nanoseconds in a millisecond.
- NANOS_
PER_ SEC - Number of nanoseconds in a second.
- TIMER_
IRQ_ NUM irq
- The timer IRQ number.
Functions§
- busy_
wait - Busy waiting for the given duration.
- busy_
wait_ until - Busy waiting until reaching the given deadline.
- current_
ticks - Returns the current clock time in hardware ticks.
- epochoffset_
nanos - Return epoch offset in nanoseconds (wall time offset to monotonic clock start).
- monotonic_
time - Returns the time elapsed since system boot in
TimeValue
. - monotonic_
time_ nanos - Returns nanoseconds elapsed since system boot.
- nanos_
to_ ticks - Converts nanoseconds to hardware ticks.
- set_
oneshot_ timer irq
- Set a one-shot timer.
- ticks_
to_ nanos - Converts hardware ticks to nanoseconds.
- wall_
time - Returns the time elapsed since epoch (also known as realtime) in
TimeValue
. - wall_
time_ nanos - Returns nanoseconds elapsed since epoch (also known as realtime).
Type Aliases§
- Time
Value - A measurement of the system clock.