mirror of
https://github.com/xzeldon/htop.git
synced 2025-01-31 09:07:25 +03:00
0cfc9b0980
Combine reading CPU count and CPU usage, only open the file once. Do not separately initialize totalPeriod and totalTime, cause the value 0 is handled in Platform_setCPUValues(). Take the number of currently running process from the entry procs_running in /proc/stat instead of counting all scanned process with state 'R', to include hidden tasks, e.g. threads.