summaryrefslogtreecommitdiffstats
path: root/openbsd
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-10-20 10:17:58 +0200
committerDaniel Lange <DLange@git.local>2020-10-20 10:17:58 +0200
commit9f1a9ab2c2d5984887f5b821afd34a8480790877 (patch)
tree940c5d8efa9a5c8d4db2407f10359a4ea6fb50a5 /openbsd
parenta0fb6e34f9e2dd83f535f3058f1a358637773298 (diff)
parent96e2a4259eb0cdf279b83d899f805d274d13a94f (diff)
Merge branch 'header_pause' of cgzones/htop
Continue to update generic data in paused mode
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/OpenBSDProcessList.c9
-rw-r--r--openbsd/OpenBSDProcessList.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index 744b8a98..5838fea9 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

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