From 857ff6155b16cf650c71f75343b33404bbf1edec Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 17 Nov 2001 00:26:57 +0000 Subject: [PATCH] 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. --- sys/kern/tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 130c42d2f11..4c0ced62ee6 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -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);