Crates.io | cpulimiter |
lib.rs | cpulimiter |
version | 0.2.0 |
source | src |
created_at | 2022-07-19 07:59:47.647239 |
updated_at | 2022-08-04 09:02:34.134788 |
description | A user-space CPU limiter crate |
homepage | https://github.com/tehtris-hub/CpuLimit |
repository | https://github.com/tehtris-hub/CpuLimit |
max_upload_size | |
id | 628135 |
size | 17,725 |
Limit the CPU usage of a process.
use cpulimiter::{CpuLimit, Pid};
let handle = CpuLimit::new(Pid::from(1048), 10.0).unwrap();
handle.set_limit(42.0);
handle.stop();