tokio_timer::clock

Trait Now

Source
pub trait Now:
    Send
    + Sync
    + 'static {
    // Required method
    fn now(&self) -> Instant;
}
Expand description

Returns Instant values representing the current instant in time.

This allows customizing the source of time which is especially useful for testing.

Implementations must ensure that calls to now return monotonically increasing Instant values.

Required Methods§

Source

fn now(&self) -> Instant

Returns an instant corresponding to “now”.

Implementors§