Registry / utility / elapsed

elapsed

JSON →
library0.1.2rscratesunverified

Measure execution time of a block of code.

# Cargo.toml [dependencies] elapsed = "0.1.2"
INSTALL
IMPORT
SIG · ELAPSED
E
elapsed
utilityrustv0.1.2
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.

elapsed
✓ use elapsed::elapsed;

Measures the time taken by a code block.

use elapsed::elapsed; fn main() { let duration = elapsed::elapsed!({ std::thread::sleep(std::time::Duration::from_secs(1)); }); println!("Took {:?}", duration); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
elapsed — cargo add elapsed · libregistry