ttime: print 1s of milliseconds - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit a012d174336358f997ddcb0099c0b01499b053e4
DIR parent 291f7411783bf6871b253f3b15ce691eea7a257e
HTML Author: Russ Cox <rsc@swtch.com>
Date: Tue, 15 Dec 2020 00:01:26 -0500
ttime: print 1s of milliseconds
Diffstat:
M src/cmd/time.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
DIR diff --git a/src/cmd/time.c b/src/cmd/time.c
t@@ -47,11 +47,11 @@ main(int argc, char *argv[])
error("wait");
}
l = w->time[0];
- add("%ld.%.2ldu", l/1000, (l%1000)/10);
+ add("%ld.%.3ldu", l/1000, l%1000);
l = w->time[1];
- add("%ld.%.2lds", l/1000, (l%1000)/10);
+ add("%ld.%.3lds", l/1000, l%1000);
l = (t1-t0)/1000000;
- add("%ld.%.2ldr", l/1000, (l%1000)/10);
+ add("%ld.%.3ldr", l/1000, l%1000);
add("\t");
for(i=1; i<argc; i++){
add("%s", argv[i], 0);