pub struct StopWatch<'l> { /* private fields */ }
Expand description

Very simple stopwatch which reads from DWT Cycle Counter to record timing.

Since DWT Cycle Counter is a 32-bit counter that wraps around to 0 on overflow, users should be aware that StopWatch cannot correctly measure laps which take longer than u32::MAX cycles

Implementations

Returns the numbers of laps recorded

Resets recorded laps to 0 and sets 0 offset

Record a new lap.

If lap count exceeds maximum, the last lap is updated

Calculate the time of lap n (n starting with 1).

Returns None if n is out of range

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.