pub trait Clock {
// Required methods
fn current_time_monotonic(&self) -> MonotonicInstant;
fn current_time_wall_clock(&self) -> WallClockInstant;
}Required Methods§
Sourcefn current_time_monotonic(&self) -> MonotonicInstant
fn current_time_monotonic(&self) -> MonotonicInstant
Monotonic time for timeout checking and elapsed time measurement. Cheap on real systems (reads TSC), controllable in simulation.
Sourcefn current_time_wall_clock(&self) -> WallClockInstant
fn current_time_wall_clock(&self) -> WallClockInstant
Wall-clock time for timestamps (WAL, datetime functions). Controllable in simulation for deterministic behavior.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".