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

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

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

fn now(&self) -> Instant

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.

Loading content...

Implementors

Loading content...