Registry / async / wasmtimer

wasmtimer

JSON →
library0.4.3rscratesunverified

Time utilities from std::time, tokio::time, and tokio_util::time for WASM targets.

# Cargo.toml [dependencies] wasmtimer = "0.4.3"
INSTALL
IMPORT
SIG · WASMTIMER
W
wasmtimer
asyncrustv0.4.3
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.

Instant
use wasmtimer::std::Instant;

Measure elapsed time using WASM-compatible Instant.

use wasmtimer::std::Instant; let start = Instant::now(); // ... some work ... let elapsed = start.elapsed(); println!("{:?}", elapsed);
Debug
Known issues
gotchaRequires the `tokio` feature for tokio::time support.
fix
Add `features = ["tokio"]` to your Cargo.toml dependency.
affects: >=0.4.0
Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
38
Resources
wasmtimer — cargo add wasmtimer · libregistry