Crates.io | cpufreq_lib |
lib.rs | cpufreq_lib |
version | 0.1.2 |
source | src |
created_at | 2023-08-24 19:49:43.817362 |
updated_at | 2023-08-28 05:51:52.232147 |
description | Wrapper arround the cpufreq fs |
homepage | |
repository | https://github.com/VitorRamos/cpufreq_rust |
max_upload_size | |
id | 954136 |
size | 16,831 |
Wrapper around cpu filesystem (/sys/devices/system/cpu/) to control various aspects.
$ cargo add cpufreq_lib
use cpufreq::CPU;
let cpu = CPU::new().unwrap();
let freqs = cpu.online().expect("Unable to read online cpus");
cpu.disable(1).unwrap();