Registry / utility / stopwatch2

stopwatch2

JSON →
library2.0.0rscratesunverified

A stopwatch library for timing things, rewritten and simplified from the original stopwatch crate.

# Cargo.toml [dependencies] stopwatch2 = "2.0.0"
INSTALL
IMPORT
SIG · STOPWATCH2
S
stopwatch2
utilityrustv2.0.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.

Stopwatch
use stopwatch2::Stopwatch;

Time a one-second sleep using Stopwatch.

use stopwatch2::Stopwatch; use std::thread::sleep; use std::time::Duration; fn main() { let mut sw = Stopwatch::start_new(); sleep(Duration::from_secs(1)); sw.stop(); println!("Elapsed: {:?}", sw.elapsed()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
stopwatch2 — cargo add stopwatch2 · libregistry