diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-10-13 16:03:37 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-10-19 14:45:39 +0200 |
commit | 96e2a4259eb0cdf279b83d899f805d274d13a94f (patch) | |
tree | 5ba621678c8089032da1ae2721665d8f67b7bb2f /ProcessList.c | |
parent | 0db398d4c3472071b2814505242450cd8f831501 (diff) |
Continue to update generic data in paused mode
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.
Improves: #214
Closes: #253
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ProcessList.c b/ProcessList.c index b5a13f0a..f2cdcf94 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -281,7 +281,13 @@ Process* ProcessList_getProcess(ProcessList* this, pid_t pid, bool* preExisting, return proc; } -void ProcessList_scan(ProcessList* this) { +void ProcessList_scan(ProcessList* this, bool pauseProcessUpdate) { + + // in pause mode only gather global data for meters (CPU/memory/...) + if (pauseProcessUpdate) { + ProcessList_goThroughEntries(this, true); + return; + } // mark all process as "dirty" for (int i = 0; i < Vector_size(this->processes); i++) { @@ -295,7 +301,7 @@ void ProcessList_scan(ProcessList* this) { this->kernelThreads = 0; this->runningTasks = 0; - ProcessList_goThroughEntries(this); + ProcessList_goThroughEntries(this, false); for (int i = Vector_size(this->processes) - 1; i >= 0; i--) { Process* p = (Process*) Vector_get(this->processes, i); |