FillZpp / sys-info-rs

Get system information in Rust.
MIT License
168 stars 57 forks source link

Make get_cpu_speed arch-independent on windows #74

Closed davidkna closed 3 years ago

davidkna commented 4 years ago

Instead of guessing the cpu speed based on performance counters query the system for the cpu speed without directly using any intel instructions. Presumably this will also make get_cpu_speed more reliable.

I assume get_cpu_speed attempts to get the maximum clock speed because that's what the old version returned for me. If you want, I can add a loop over all the returned results and return the maximum or the value for the current cpu to better support heterogeneous architectures.

closes #68