Registry / utility / web-time

web-time

JSON →
library1.1.0rscratesunverified

A drop-in replacement for `std::time` that works in WebAssembly browsers.

# Cargo.toml [dependencies] web-time = "1.1.0"
INSTALL
IMPORT
SIG · WEB-TIME
W
web-time
utilityrustv1.1.0
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 web_time::Instant;

Measure elapsed time using `Instant`.

use web_time::Instant; let start = Instant::now(); // ... do work ... let elapsed = start.elapsed(); println!("Elapsed: {:?}", elapsed);
Debug
Known issues
gotchaOn non-Wasm targets, delegates to `std::time`; ensure feature flags are correct.
fix
Enable the `wasm-bindgen` feature when targeting WebAssembly.
affects: >=1.0.0
Upgrade
Version history
1.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
web-time — cargo add web-time · libregistry