Trait metered::time_source::Instant [−][src]
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
.
Associated Constants
Loading content...Required methods
fn now() -> Self
[src]
Creates a new Instant representing the current time.
fn elapsed_time(&self) -> u64
[src]
Returns the elapsed time since an Instant was created.
The unit depends on the Instant’s resolution, as defined by the
ONE_SEC
constant.