Function tokio_timer::clock::now
source · [−]pub fn now() -> Instant
Expand description
Returns an Instant
corresponding to “now”.
This function delegates to the source of time configured for the current
execution context. By default, this is Instant::now()
.
Note that, because the source of time is configurable, it is possible to
observe non-monotonic behavior when calling now
from different
executors.
See module level documentation for more details.
Examples
let now = clock::now();