tokio-timer

Timer facilities for Tokio

9 releases

0.2.6 Aug 24, 2018
0.2.4 Jun 7, 2018
0.2.0 Mar 30, 2018
0.1.2 Jun 27, 2017
0.1.0 Jan 12, 2017

#6 in Asynchronous

Download history 17351/week @ 2018-07-09 23163/week @ 2018-07-16 22129/week @ 2018-07-23 20572/week @ 2018-07-30 22839/week @ 2018-08-06 27129/week @ 2018-08-13 22304/week @ 2018-08-20 26742/week @ 2018-08-27 28967/week @ 2018-09-03 27000/week @ 2018-09-10 28753/week @ 2018-09-17 28295/week @ 2018-09-24 27834/week @ 2018-10-01

98,356 downloads per month
Used in 1,407 crates (90 directly)

MIT license

141KB
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.

  • 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

~507KB