Registry / utility / cpu-time

cpu-time

JSON →
library1.0.0rscratesunverified

A small crate for measuring CPU time (user and system) of processes and threads.

# Cargo.toml [dependencies] cpu-time = "1.0.0"
INSTALL
IMPORT
SIG · CPU-TIME
C
cpu-time
utilityrustv1.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.

ProcessTime
use cpu_time::ProcessTime;

Measure CPU time of a code block

use cpu_time::ProcessTime; let start = ProcessTime::now(); // ... some computation ... let cpu_time = start.elapsed(); println!("CPU time: {:?}", cpu_time);
Debug
Known issues
gotchaCPU time measurement may not be available on all platforms (e.g., some embedded systems)
fix
Check platform support before relying on this crate
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
cpu-time — cargo add cpu-time · libregistry