22 releases

0.3.0-alpha.6 Sep 30, 2019
0.3.0-alpha.4 Aug 29, 2019
0.2.13 Feb 4, 2020
0.2.11 May 14, 2019
0.1.0 Jan 12, 2017

#5 in #delay-queue

Download history 49244/week @ 2024-07-21 51228/week @ 2024-07-28 47882/week @ 2024-08-04 51570/week @ 2024-08-11 41544/week @ 2024-08-18 45428/week @ 2024-08-25 41487/week @ 2024-09-01 45821/week @ 2024-09-08 39577/week @ 2024-09-15 41333/week @ 2024-09-22 52786/week @ 2024-09-29 46966/week @ 2024-10-06 52112/week @ 2024-10-13 47173/week @ 2024-10-20 47814/week @ 2024-10-27 45538/week @ 2024-11-03

196,088 downloads per month
Used in fewer than 82 crates

MIT license

525KB
9K 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

~1MB
~18K SLoC