pub trait Clock: Sync {
    fn now(&self) -> u64;
}
Expand description

A monotonic source of time.

Clocks must always returning increasing timestamps.

Required Methods

Returns a timestamp in milliseconds which represents the current time according to the clock.

Clocks must only return timestamps that are bigger or equal than what they returned on the last call to now().

Implementors