pub trait Clock: Send + Sync {
type Instant: Copy + Send + Sync;
// Required methods
fn now(&self) -> Self::Instant;
fn elapsed_millis(&self, since: Self::Instant) -> u64;
}Expand description
Provides timing information for the runtime.
Required Associated Types§
Required Methods§
Sourcefn elapsed_millis(&self, since: Self::Instant) -> u64
fn elapsed_millis(&self, since: Self::Instant) -> u64
Returns the number of milliseconds elapsed since since.