diff options
Diffstat (limited to '')
-rw-r--r-- | pkgs/by-name/ya/yambar-modules/src/cpu.rs (renamed from pkgs/by-name/ya/yambar-cpu/src/main.rs) | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/by-name/ya/yambar-cpu/src/main.rs b/pkgs/by-name/ya/yambar-modules/src/cpu.rs index 9314b81e..5a6dd084 100644 --- a/pkgs/by-name/ya/yambar-cpu/src/main.rs +++ b/pkgs/by-name/ya/yambar-modules/src/cpu.rs @@ -2,10 +2,9 @@ use std::{thread, time::Duration}; use sysinfo::{CpuExt, System, SystemExt}; -fn main() { +pub fn cpu() { let mut sys = System::new(); - // Number of CPUs: loop { sys.refresh_cpu(); let cpu_usage: f32 = sys.cpus().iter().map(|cpu| cpu.cpu_usage()).sum(); |