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

@ -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);