mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Do not use extra starttime process field on Linux
This commit is contained in:

committed by
cgzones

parent
d744dac7ee
commit
783be7711d
@ -225,13 +225,6 @@ void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field)
|
||||
case STIME: Process_printTime(str, lp->stime); return;
|
||||
case CUTIME: Process_printTime(str, lp->cutime); return;
|
||||
case CSTIME: Process_printTime(str, lp->cstime); return;
|
||||
case STARTTIME: {
|
||||
struct tm date;
|
||||
time_t starttimewall = btime + (lp->starttime / sysconf(_SC_CLK_TCK));
|
||||
(void) localtime_r(&starttimewall, &date);
|
||||
strftime(buffer, n, ((starttimewall > time(NULL) - 86400) ? "%R " : "%b%d "), &date);
|
||||
break;
|
||||
}
|
||||
#ifdef HAVE_TASKSTATS
|
||||
case RCHAR: Process_colorNumber(str, lp->io_rchar, coloring); return;
|
||||
case WCHAR: Process_colorNumber(str, lp->io_wchar, coloring); return;
|
||||
@ -334,12 +327,6 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
|
||||
case CUTIME: diff = p2->cutime - p1->cutime; goto test_diff;
|
||||
case STIME: diff = p2->stime - p1->stime; goto test_diff;
|
||||
case CSTIME: diff = p2->cstime - p1->cstime; goto test_diff;
|
||||
case STARTTIME: {
|
||||
if (p1->starttime == p2->starttime)
|
||||
return (p1->super.pid - p2->super.pid);
|
||||
else
|
||||
return (p1->starttime - p2->starttime);
|
||||
}
|
||||
#ifdef HAVE_TASKSTATS
|
||||
case RCHAR: diff = p2->io_rchar - p1->io_rchar; goto test_diff;
|
||||
case WCHAR: diff = p2->io_wchar - p1->io_wchar; goto test_diff;
|
||||
|
Reference in New Issue
Block a user