pub trait Clock {
fn now() -> Self;
fn set_scaling_factor(&mut self, scaling: usize);
fn duration_since(&self, earlier: Self) -> Duration;
}
Expand description
A trait for time sources. This allows methods to be generic over different ways of measuring time.
Required methods
fn set_scaling_factor(&mut self, scaling: usize)
fn set_scaling_factor(&mut self, scaling: usize)
Set a scaling factor, which can be used to convert a difference of timestamps to seconds.