Expand description

This crates provides tokio-timer-like API on top of timerfd. timerfd is a Linux-specific API providing timer notifications as file descriptor read events.

The advantage of timerfd is that it has more granularity than epoll_wait(), which only provides 1 millisecond timeouts. timerfd API allows for nanosecond precision, but precise timing of the wakeup is not guaranteed on a normal multitasking system.

Despite the name, this crate is not a part of the tokio project.

  • Delay: A future that completes at a specified instant in time.
  • Interval A stream that yields at fixed time intervals.
  • DelayQueue: A queue where items are returned once the requested delay has expired.

Structs

A future that completes at a specified instant in time. Instances of Delay perform no work and complete with () once the specified deadline has been reached. Delay is powered by timerfd and has a resolution of 1 nanosecond.

A stream representing notifications at fixed interval

Enums

Functions

Create a Future that completes in duration from now.