Merge branch 'lakerka/procps-patch1'
* lakerka/procps-patch1: whattime: Fix formatting whattime: Show 0 minutes in pretty output
This commit is contained in:
commit
04835608dd
@ -146,9 +146,9 @@ char *sprint_uptime(int human_readable) {
|
|||||||
comma += 1;
|
comma += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upminutes) {
|
if (upminutes || (!upminutes && uptime_secs < 60)) {
|
||||||
pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", upminutes,
|
pos += sprintf(buf + pos, "%s%d %s", comma > 0 ? ", " : "", upminutes,
|
||||||
upminutes > 1 ? "minutes" : "minute");
|
upminutes != 1 ? "minutes" : "minute");
|
||||||
comma += 1;
|
comma += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user