tokio-timer

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

#4 in Network programming

Download history 52104/week @ 2019-01-29 55404/week @ 2019-02-05 58194/week @ 2019-02-12 58317/week @ 2019-02-19 61894/week @ 2019-02-26 59740/week @ 2019-03-05 60079/week @ 2019-03-12 58490/week @ 2019-03-19 55086/week @ 2019-03-26 61814/week @ 2019-04-02 64524/week @ 2019-04-09 54024/week @ 2019-04-16 54853/week @ 2019-04-23 52105/week @ 2019-04-30 53652/week @ 2019-05-07

246,704 downloads per month
Used in 1,788 crates (123 directly)

MIT license

153KB
2.5K SLoC

tokio-timer

Timer facilities for Tokio

Documentation

Overview

This crate provides timer facilities for usage with 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

~573KB