summaryrefslogtreecommitdiffstats
path: root/CPUMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-02-17 16:26:10 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-03-12 17:31:45 +0100
commit0cfc9b09805679cf16bec30b0dc7a769a269d628 (patch)
tree50e181e34826d4be76341c970b96fd0e768c65df /CPUMeter.c
parent521f1343e372e011326e10cf58a9ba1d191b7bdb (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

© 2014-2024 Faster IT GmbH | imprint | privacy policy