Ganneff/munin-cpu1sec

Possibly wrong calculation

Closed this issue · 0 comments

https://github.com/Ganneff/cpu1sec/blob/0642acf801be2ae0bd168482e6161c2309e18951/src/main.rs#L123-L143

That's possibly wrong (or the definition of CpuStat). We want to calculate the diff, but numbers are unsigned. Now, if new (other) is higher, this will fail (or not, in release builds Rust will hide the failure).