forked from async-rs/futures-timer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.rs
More file actions
37 lines (33 loc) · 969 Bytes
/
Copy pathlib.rs
File metadata and controls
37 lines (33 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! A general purpose crate for working with timeouts and delays with futures.
//!
//! # Examples
//!
//! ```
//! use std::time::Duration;
//! use futures_timer::Delay;
//! use futures::executor::block_on;
//!
//! let now = block_on(Delay::new(Duration::from_secs(3)));
//! println!("waited for 3 secs");
//! ```
#![deny(missing_docs)]
#![warn(missing_debug_implementations)]
mod arc_list;
mod atomic_waker;
#[cfg(not(all(target_arch = "wasm32", feature = "wasm-bindgen")))]
mod delay;
#[cfg(all(target_arch = "wasm32", feature = "wasm-bindgen"))]
mod delay_wasm;
mod global;
mod heap;
mod heap_timer;
mod timer;
use arc_list::{ArcList, Node};
use atomic_waker::AtomicWaker;
use heap::{Heap, Slot};
use heap_timer::HeapTimer;
use timer::{ScheduledTimer, Timer, TimerHandle};
#[cfg(not(all(target_arch = "wasm32", feature = "wasm-bindgen")))]
pub use self::delay::Delay;
#[cfg(all(target_arch = "wasm32", feature = "wasm-bindgen"))]
pub use self::delay_wasm::Delay;