use rpsutil::cpu; fn main() { // --- CPU count --- println!("logical cpu count: {}", cpu::cpu_count(true).unwrap()); println!("physical cpu count: {}", cpu::cpu_count(false).unwrap()); // --- CPU times --- // system println!("system: {:?}", cpu::system_time()); // per cpu for (idx, cpu_time) in cpu::per_cpu_time().iter().enumerate() { println!("cpu {}: {:?}", idx + 1, cpu_time); } }