Struct slos_helpers::Timer [−][src]
Expand description
A time keeper.
This structure is used by the kernel to keep record of the current time since boot, as well as for timer operations such as delays.
The global kernel timer can be cloned and then incremented, allowing delay operations by then comparing the cloned and incremented timer to the global timer.
Fields
seconds: u64
microseconds: u32
Implementations
Increment the timer by the given number of microseconds.
This operation wraps the internal microseconds
value, keeping the
internal seconds
value accurate.
Increment the timer by the given number of milliseconds.
This operation wraps the internal microseconds
value, keeping the
internal seconds
value accurate.
Returns this timer’s total time in milliseconds.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Timer
impl UnwindSafe for Timer
Blanket Implementations
Mutably borrows from an owned value. Read more