pub trait Clock:
Send
+ Sync
+ Debug {
// Required methods
fn now(&self) -> Instant;
fn system_time(&self) -> SystemTime;
// Provided method
fn since(&self, earlier: Instant) -> Duration { ... }
}Expand description
A source of monotonic and wall-clock time.
Required Methods§
Sourcefn system_time(&self) -> SystemTime
fn system_time(&self) -> SystemTime
The current wall-clock time. Use for timestamps that leave the process.