Closed comfortablynick closed 4 months ago
https://docs.rs/sysinfo/latest/sysinfo/struct.Cpu.html#method.cpu_usage
If you follow what is described in the docs, please re-open this issue.
Thank you, I hadn't caught that. It seems to be a lot closer to another utility when I do this:
let mut sys = System::new_all();
sys.refresh_all();
std::thread::sleep(sysinfo::MINIMUM_CPU_UPDATE_INTERVAL);
sys.refresh_cpu();
dbg!(&sys);
Describe the bug If I print the
System
struct, the CPU usage basically stays the same no matter what, and doesn't correspond to Activity Monitor or any of the other tools I have looked at. Here is a typical debug print:This number doesn't really change even when building large projects that peg the CPU in Activity Monitor. Am I using this incorrectly?
To Reproduce