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 /openbsd | |
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 'openbsd')
-rw-r--r-- | openbsd/OpenBSDProcessList.c | 9 | ||||
-rw-r--r-- | openbsd/OpenBSDProcessList.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c index 4b030707..83369494 100644 --- a/openbsd/OpenBSDProcessList.c +++ b/openbsd/OpenBSDProcessList.c @@ -340,10 +340,15 @@ static void OpenBSDProcessList_scanCPUTime(OpenBSDProcessList* this) { kernelCPUTimesToHtop(avg, this->cpus); } -void ProcessList_goThroughEntries(ProcessList* this) { +void ProcessList_goThroughEntries(ProcessList* this, bool pauseProcessUpdate) { OpenBSDProcessList* opl = (OpenBSDProcessList*) this; OpenBSDProcessList_scanMemoryInfo(this); - OpenBSDProcessList_scanProcs(opl); OpenBSDProcessList_scanCPUTime(opl); + + // in pause mode only gather global data for meters (CPU/memory/...) + if (pauseProcessUpdate) + return; + + OpenBSDProcessList_scanProcs(opl); } diff --git a/openbsd/OpenBSDProcessList.h b/openbsd/OpenBSDProcessList.h index ab478571..3c3f1a33 100644 --- a/openbsd/OpenBSDProcessList.h +++ b/openbsd/OpenBSDProcessList.h @@ -45,6 +45,6 @@ void ProcessList_delete(ProcessList* this); char *OpenBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd); -void ProcessList_goThroughEntries(ProcessList* this); +void ProcessList_goThroughEntries(ProcessList* this, bool pauseProcessUpdate); #endif |