Module actix::clock[][src]

Expand description

Utilities for tracking time.

This module provides a number of types for executing code after a set period of time.

See tokio::time module for full documentation.

Structs

Instant

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

Interval

Interval returned by interval and interval_at.

Sleep

Future returned by sleep and sleep_until.

Timeout

Future returned by timeout and timeout_at.

Functions

interval

Creates new Interval that yields with interval of duration. The first tick completes immediately.

interval_at

Creates new Interval that yields with interval of period with the first tick completing at start.

sleep

Waits until duration has elapsed.

sleep_until

Waits until deadline is reached.

timeout

Require a Future to complete before the specified duration has elapsed.