Article View: gnu.utils.bug
Article #1051GNU time-1.4 misreports times
From: Rick Sladkey
Date: Fri, 06 Nov 1992 22:51
Date: Fri, 06 Nov 1992 22:51
29 lines
1581 bytes
1581 bytes
GNU time-1.4 misreports times when the fractional seconds are less than 0.10 by omitting the leading zero in the tenths place. For example: 0.09 seconds is reported as 0.9 seconds. ----- --- orig/time-1.4/time.c Wed Oct 28 14:21:05 1992 +++ time-1.4/time.c Sat Nov 7 03:30:26 1992 @@ -388,11 +388,11 @@ fprintf (fp, "%ld", rup->ru_minflt); break; case 'S': /* System time. */ - fprintf (fp, "%ld.%ld", + fprintf (fp, "%ld.%02ld", rup->ru_stime.tv_sec, rup->ru_stime.tv_usec / 10000); break; case 'U': /* User time. */ - fprintf (fp, "%ld.%ld", + fprintf (fp, "%ld.%02ld", rup->ru_utime.tv_sec, rup->ru_utime.tv_usec / 10000); break; case 'W': /* Times swapped out. */ @@ -409,7 +409,7 @@ fprintf (fp, "%ld", rup->ru_nivcsw); break; case 'e': /* Elapsed real time in seconds. */ - fprintf (fp, "%ld.%ld", tv->tv_sec, tv->tv_usec / 10000); + fprintf (fp, "%ld.%02ld", tv->tv_sec, tv->tv_usec / 10000); break; case 'k': /* Signals delivered. */ fprintf (fp, "%ld", rup->ru_nsignals);
Technical Details
Message-ID:
<199211070851.AA22371@world.std.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!world.std.com!jrsShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!world.std.com!jrs From: jrs@world.std.com (Rick Sladkey) Subject: GNU time-1.4 misreports times Message-ID: <199211070851.AA22371@world.std.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 6 Nov 1992 22:51:18 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 30