Registry / async / tokio-timer

tokio-timer

JSON →
library0.2.13rscratesunverified

Timer facilities for Tokio, providing delay and interval primitives.

# Cargo.toml [dependencies] tokio-timer = "0.2.13"
INSTALL
IMPORT
SIG · TOKIO-TIMER
T
tokio-timer
asyncrustv0.2.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sleep
✓ use tokio::time::sleep;

Use tokio::time::sleep to pause execution asynchronously.

use tokio::time::{sleep, Duration}; #[tokio::main] async fn main() { sleep(Duration::from_secs(1)).await; println!("Waited 1 second"); }
Debug
Known issues
gotchaRequires the 'time' feature flag on tokio (enabled by default in full).
fix
Add tokio = { version = "1", features = ["time"] } to Cargo.toml.
affects: >=1.0.0
Upgrade
Version history
0.2.13latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
50 hits · last 30 days
node
42
OpenAI (training)
1
Resources