Merge branch 'header_pause' of cgzones/htop

Continue to update generic data in paused mode
This commit is contained in:
Daniel Lange
2020-10-20 10:17:58 +02:00
18 changed files with 61 additions and 24 deletions

View File

@ -144,7 +144,7 @@ void ProcessList_delete(ProcessList* this) {
free(this);
}
void ProcessList_goThroughEntries(ProcessList* super) {
void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
DarwinProcessList *dpl = (DarwinProcessList *)super;
bool preExisting = true;
struct kinfo_proc *ps;
@ -158,6 +158,10 @@ void ProcessList_goThroughEntries(ProcessList* super) {
ProcessList_getVMStats(&dpl->vm_stats);
openzfs_sysctl_updateArcStats(&dpl->zfs);
// in pause mode only gather global data for meters (CPU/memory/...)
if (pauseProcessUpdate)
return;
/* Get the time difference */
dpl->global_diff = 0;
for(int i = 0; i < dpl->super.cpuCount; ++i) {

View File

@ -51,6 +51,6 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui
void ProcessList_delete(ProcessList* this);
void ProcessList_goThroughEntries(ProcessList* super);
void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
#endif