mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user