Trait rubble::time::Timer[][src]

pub trait Timer {
    fn now(&self) -> Instant;
}
Expand description

Trait for time providers.

The hardware interface has to provide an implementation of Timer to the stack. The implementation must have microsecond accuracy.

This trait can also be implemented by a mock timer for testing.

Required methods

Obtain the current time as an Instant.

The Instants returned by this function must never move backwards in time, except when the underlying value wraps around.

Implementors