🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Rick Sladkey Fri, 06 Nov 1992 22:51
GNU time-1.4 misreports times
#1051
Author: Rick Sladkey
Date: Fri, 06 Nov 1992 22:51
29 lines
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);
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads