summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-13 16:03:37 +0200
committerChristian Göttsche <cgzones@googlemail.com>2020-10-19 14:45:39 +0200
commit96e2a4259eb0cdf279b83d899f805d274d13a94f (patch)
tree5ba621678c8089032da1ae2721665d8f67b7bb2f /linux
parent0db398d4c3472071b2814505242450cd8f831501 (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 'linux')
-rw-r--r--linux/LinuxProcessList.c6
-rw-r--r--linux/LinuxProcessList.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 1ed13826..7e29e721 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1382,7 +1382,7 @@ static void LinuxProcessList_scanCPUFrequency(LinuxProcessList* this) {
scanCPUFreqencyFromCPUinfo(this);
}
-void ProcessList_goThroughEntries(ProcessList* super) {
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
LinuxProcessList* this = (LinuxProcessList*) super;
const Settings* settings = super->settings;
@@ -1396,6 +1396,10 @@ void ProcessList_goThroughEntries(ProcessList* super) {
if (settings->showCPUFrequency)
LinuxProcessList_scanCPUFrequency(this);
+ // in pause mode only gather global data for meters (CPU/memory/...)
+ if (pauseProcessUpdate)
+ return;
+
struct timeval tv;
gettimeofday(&tv, NULL);
LinuxProcessList_recurseProcTree(this, PROCDIR, NULL, period, tv);
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index 57bc9dc0..4427ccdf 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -101,6 +101,6 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui
void ProcessList_delete(ProcessList* pl);
-void ProcessList_goThroughEntries(ProcessList* super);
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
#endif

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