Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn now(&self) -> Instant;
}
Expand description

Provides the current time as an Instant.

Implementations must be deterministic within a simulation context - the same sequence of now() calls must return the same values given the same simulation inputs. On real targets this wraps the hardware timer or OS monotonic clock.

Required Methods§

Source

fn now(&self) -> Instant

Implementors§