Closed maxpowel closed 2 years ago
Looks like i32 is not enough for storing the temporal CPU usage variables. My computer uptime command returns
11:26:42 up 7 days, 17:52, 16 users, load average: 1,18, 1,67, 1,67
and the value from /proc/stat
is huge (cannot fit into an i32
).
Probably just chaning it to something like u64
will prevent this. All of us will be dead when someone keeps a machine up this long time xD.
Just run this code
And the error returned is: