mirror of https://github.com/xzeldon/htop.git
Fix time-based sorting
This commit is contained in:
parent
eb1cd4aca6
commit
ea191b53bd
10
Process.c
10
Process.c
|
@ -338,7 +338,7 @@ static void Process_humanNumber(RichString* str, unsigned long number, bool colo
|
||||||
largeNumberColor = CRT_colors[PROCESS];
|
largeNumberColor = CRT_colors[PROCESS];
|
||||||
processMegabytesColor = CRT_colors[PROCESS];
|
processMegabytesColor = CRT_colors[PROCESS];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(number >= (10 * ONE_DECIMAL_M)) {
|
if(number >= (10 * ONE_DECIMAL_M)) {
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
if(number >= (100 * ONE_DECIMAL_G)) {
|
if(number >= (100 * ONE_DECIMAL_G)) {
|
||||||
|
@ -841,10 +841,10 @@ int Process_compare(const void* v1, const void* v2) {
|
||||||
return (p2->percent_cpu > p1->percent_cpu ? 1 : -1);
|
return (p2->percent_cpu > p1->percent_cpu ? 1 : -1);
|
||||||
case PERCENT_MEM:
|
case PERCENT_MEM:
|
||||||
return (p2->m_resident - p1->m_resident);
|
return (p2->m_resident - p1->m_resident);
|
||||||
case UTIME:
|
case UTIME: diff = p2->utime - p1->utime; goto test_diff;
|
||||||
return (p2->utime - p1->utime);
|
case CUTIME: diff = p2->cutime - p1->cutime; goto test_diff;
|
||||||
case STIME:
|
case STIME: diff = p2->stime - p1->stime; goto test_diff;
|
||||||
return (p2->stime - p1->stime);
|
case CSTIME: diff = p2->cstime - p2->cstime; goto test_diff;
|
||||||
case TIME:
|
case TIME:
|
||||||
return ((p2->utime+p2->stime) - (p1->utime+p1->stime));
|
return ((p2->utime+p2->stime) - (p1->utime+p1->stime));
|
||||||
case COMM:
|
case COMM:
|
||||||
|
|
Loading…
Reference in New Issue