Registry / utility / quanta

quanta

JSON →
library0.12.6rscratesunverified

High-speed timing library for performance measurement.

# Cargo.toml [dependencies] quanta = "0.12.6"
INSTALL
IMPORT
SIG · QUANTA
Q
quanta
utilityrustv0.12.6
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.

Clock
use quanta::Clock;

Measures elapsed time with high precision.

use quanta::Clock; fn main() { let clock = Clock::new(); let start = clock.now(); std::thread::sleep(std::time::Duration::from_millis(10)); let end = clock.now(); println!("Elapsed: {:?}", end - start); }
Debug
Known issues
gotchaOn some platforms, the clock may not be monotonic if not configured properly.
fix
Use `Clock::new()` which defaults to the best available source.
affects: >=0.1.0
Upgrade
Version history
0.12.6latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
quanta — cargo add quanta · libregistry