Refactor generating starttime string into Process class

This commit is contained in:
Christian Göttsche
2020-10-13 14:26:40 +02:00
committed by cgzones
parent 783be7711d
commit a63cfc8b7c
10 changed files with 19 additions and 40 deletions

View File

@ -1035,9 +1035,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
goto errorReadingProcess;
}
struct tm date;
(void) localtime_r(&proc->starttime_ctime, &date);
strftime(proc->starttime_show, 7, ((proc->starttime_ctime > tv.tv_sec - 86400) ? "%R " : "%b%d "), &date);
Process_fillStarttimeBuffer(proc);
ProcessList_add(pl, proc);
} else {