home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / utils / bug / 2010 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.5 KB  |  43 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!world.std.com!jrs
  3. From: jrs@world.std.com (Rick Sladkey)
  4. Subject: GNU time-1.4 misreports times
  5. Message-ID: <199211070851.AA22371@world.std.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 6 Nov 1992 22:51:18 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 30
  12.  
  13. GNU time-1.4 misreports times when the fractional seconds are less
  14. than 0.10 by omitting the leading zero in the tenths place.  For
  15. example: 0.09 seconds is reported as 0.9 seconds.
  16. -----
  17. --- orig/time-1.4/time.c    Wed Oct 28 14:21:05 1992
  18. +++ time-1.4/time.c    Sat Nov  7 03:30:26 1992
  19. @@ -388,11 +388,11 @@
  20.            fprintf (fp, "%ld", rup->ru_minflt);
  21.            break;
  22.          case 'S':        /* System time.  */
  23. -          fprintf (fp, "%ld.%ld",
  24. +          fprintf (fp, "%ld.%02ld",
  25.                 rup->ru_stime.tv_sec, rup->ru_stime.tv_usec / 10000);
  26.            break;
  27.          case 'U':        /* User time.  */
  28. -          fprintf (fp, "%ld.%ld",
  29. +          fprintf (fp, "%ld.%02ld",
  30.                 rup->ru_utime.tv_sec, rup->ru_utime.tv_usec / 10000);
  31.            break;
  32.          case 'W':        /* Times swapped out.  */
  33. @@ -409,7 +409,7 @@
  34.            fprintf (fp, "%ld", rup->ru_nivcsw);
  35.            break;
  36.          case 'e':        /* Elapsed real time in seconds.  */
  37. -          fprintf (fp, "%ld.%ld", tv->tv_sec, tv->tv_usec / 10000);
  38. +          fprintf (fp, "%ld.%02ld", tv->tv_sec, tv->tv_usec / 10000);
  39.            break;
  40.          case 'k':        /* Signals delivered.  */
  41.            fprintf (fp, "%ld", rup->ru_nsignals);
  42.  
  43.