[−][src]Trait metered::time_source::Instant
A trait for any time source providing time measurements in milliseconds.
It is useful to let users provide an unsynchronized (!Send
/!Sync
) time source, unlike std's Instant
.
Required methods
fn now() -> Self
Creates a new Instant representing the current time.
fn elapsed_millis(&self) -> u64
Returns the elapsed time in milliseconds since an Instant was created.