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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".