diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-02-17 16:26:10 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-03-12 17:31:45 +0100 |
commit | 0cfc9b09805679cf16bec30b0dc7a769a269d628 (patch) | |
tree | 50e181e34826d4be76341c970b96fd0e768c65df /CPUMeter.c | |
parent | 521f1343e372e011326e10cf58a9ba1d191b7bdb (diff) |
LinuxProcessList: refactor /proc/stat parsing
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.
Diffstat (limited to 'CPUMeter.c')
0 files changed, 0 insertions, 0 deletions