pub fn pause()
Available on crate feature
time
only.Expand description
Pause time
The current value of Instant::now()
is saved and all subsequent calls
to Instant::now()
will return the saved value. This is useful for
running tests that are dependent on time.
ยงPanics
Panics if time is already frozen or if called from outside of the Tokio runtime.