20 releases

✓ Uses Rust 2018 edition

0.3.0-alpha.6 Sep 30, 2019
0.3.0-alpha.4 Aug 29, 2019
0.2.11 May 14, 2019
0.2.10 Feb 5, 2019
0.1.0 Jan 12, 2017
Download history 75369/week @ 2019-06-17 73914/week @ 2019-06-24 67547/week @ 2019-07-01 69136/week @ 2019-07-08 70376/week @ 2019-07-15 71674/week @ 2019-07-22 75296/week @ 2019-07-29 80892/week @ 2019-08-05 84425/week @ 2019-08-12 79092/week @ 2019-08-19 80093/week @ 2019-08-26 83025/week @ 2019-09-02 83668/week @ 2019-09-09 88736/week @ 2019-09-16 89261/week @ 2019-09-23

337,252 downloads per month
Used in 2,259 crates (139 directly)

MIT license

350KB
6K SLoC

tokio-timer

Timer facilities for Tokio

License

This project is licensed under the MIT license.

Contribution

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.


lib.rs:

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.

Dependencies

~565KB