#futures #timer

futures-timer

Timeouts and intervals for futures

11 releases (2 stable)

✓ Uses Rust 2018 edition

new 1.0.1 Oct 9, 2019
0.6.0 Oct 9, 2019
0.5.0 Oct 6, 2019
0.4.0 Sep 6, 2019
0.0.0 Sep 27, 2017
Download history 5837/week @ 2019-06-26 4699/week @ 2019-07-03 5372/week @ 2019-07-10 5618/week @ 2019-07-17 6769/week @ 2019-07-24 7293/week @ 2019-07-31 7145/week @ 2019-08-07 7931/week @ 2019-08-14 7557/week @ 2019-08-21 8211/week @ 2019-08-28 9929/week @ 2019-09-04 9815/week @ 2019-09-11 10616/week @ 2019-09-18 11273/week @ 2019-09-25 12674/week @ 2019-10-02

36,702 downloads per month
Used in 45 crates (23 directly)

MIT/Apache

38KB
852 lines

futures-timer

Build Status

Documentation

A library for working with timers, timeouts, and intervals with the futures crate.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

A general purpose crate for working with timeouts and delays with futures.

Examples

# #[runtime::main]
# async fn main() {
use std::time::Duration;
use futures_timer::Delay;
use futures::prelude::*;

let now = Delay::new(Duration::from_secs(3)).await;
println!("waited for 3 secs");
# }

Dependencies

~660KB
~13K SLoC