Skip to main content

Module time

Module time 

Source
Expand description

Utilities for tracking time.

Structs§

Deadline
Future returned by deadline.
Interval
An interval returned by interval.
Millis
A span of time in milliseconds, for timeouts.
Seconds
A span of time in whole seconds.
Sleep
Future returned by sleep.
Timeout
Future returned by timeout.
TimeoutChecked
Future returned by timeout_checked.
TimerHandle
Handle to a timer registered with ntex’s local timer wheel.

Functions§

deadline
Waits until dur has elapsed.
interval
Creates an Interval that ticks every period.
now
Returns a cached approximation of the current instant.
sleep
Waits until dur has elapsed.
system_time
Returns a cached approximation of the current system time.
timeout
Requires a future to complete before dur has elapsed.
timeout_checked
Requires a future to complete before dur has elapsed.