mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
utime/stime.tv_sec are elapsed times, not relative to 1970. We can
safely print them as longs. Even if ^T overflows after a process has accumulated 68 years of user or system time, it is no big deal.
This commit is contained in:
parent
d2334e27e9
commit
857ff6155b
1 changed files with 4 additions and 4 deletions
|
|
@ -2349,12 +2349,12 @@ ttyinfo(tp)
|
|||
stmp);
|
||||
|
||||
/* Print user time. */
|
||||
ttyprintf(tp, "%lld.%02ldu ",
|
||||
(long long)utime.tv_sec, utime.tv_usec / 10000);
|
||||
ttyprintf(tp, "%ld.%02ldu ",
|
||||
(long)utime.tv_sec, utime.tv_usec / 10000);
|
||||
|
||||
/* Print system time. */
|
||||
ttyprintf(tp, "%lld.%02lds ",
|
||||
(long long)stime.tv_sec, stime.tv_usec / 10000);
|
||||
ttyprintf(tp, "%ld.%02lds ",
|
||||
(long)stime.tv_sec, stime.tv_usec / 10000);
|
||||
|
||||
/* Print percentage cpu, resident set size. */
|
||||
ttyprintf(tp, "%d%% %ldk\n", tmp / 100, ltmp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue