Timer facilities for Tokio

14 releases

0.2.11 May 14, 2019
0.2.10 Feb 5, 2019
0.2.9 Jan 25, 2019
0.2.8 Nov 22, 2018
0.1.0 Jan 12, 2017

#5 in Network programming

Download history 54580/week @ 2019-03-24 61060/week @ 2019-03-31 64857/week @ 2019-04-07 56760/week @ 2019-04-14 53975/week @ 2019-04-21 51559/week @ 2019-04-28 53278/week @ 2019-05-05 67564/week @ 2019-05-12 70723/week @ 2019-05-19 70315/week @ 2019-05-26 76864/week @ 2019-06-02 74138/week @ 2019-06-09 75684/week @ 2019-06-16 74278/week @ 2019-06-23 68376/week @ 2019-06-30

259,726 downloads per month
Used in 1,938 crates (121 directly)

MIT license

2.5K SLoC


Timer facilities for Tokio



This crate provides timer facilities for usage with Tokio.


This project is licensed under the MIT license.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.

Utilities for tracking time.

This crate provides a number of utilities for working with periods of time:

  • Delay: A future that completes at a specified instant in time.

  • Interval A stream that yields at fixed time intervals.

  • Throttle: Throttle down a stream by enforcing a fixed delay between items.

  • Timeout: Wraps a future or stream, setting an upper bound to the amount of time it is allowed to execute. If the future or stream does not complete in time, then it is canceled and an error is returned.

  • DelayQueue: A queue where items are returned once the requested delay has expired.

These three types are backed by a Timer instance. In order for Delay, Interval, and Timeout to function, the associated Timer instance must be running on some thread.