summaryrefslogtreecommitdiff
path: root/miscutils/time.c
diff options
context:
space:
mode:
authorEric Andersen2002-09-27 23:34:53 +0000
committerEric Andersen2002-09-27 23:34:53 +0000
commit92052e3945820f50e71737658997cc35ed287105 (patch)
treed7a8d301a50b6c16de789a8c22fc1ccfbd477908 /miscutils/time.c
parent2e41d0cb777e6af086b45555551780e02ad13f46 (diff)
downloadbusybox-92052e3945820f50e71737658997cc35ed287105.zip
busybox-92052e3945820f50e71737658997cc35ed287105.tar.gz
Bug fix from Nitin Gupta <gupta@equator.com>
Diffstat (limited to 'miscutils/time.c')
-rw-r--r--miscutils/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/time.c b/miscutils/time.c
index 24a5b9a..3a44b18 100644
--- a/miscutils/time.c
+++ b/miscutils/time.c
@@ -313,12 +313,12 @@ static void summarize (FILE *fp, const char *fmt, char **command, resource_t *re
fprintf (fp, "%ldh %ldm %02lds",
resp->ru.ru_stime.tv_sec / 3600,
(resp->ru.ru_stime.tv_sec % 3600) / 60,
- resp->ru.ru_stime.tv_sec % 60);
+ resp->ru.ru_stime.tv_usec % 60);
else
fprintf (fp, "%ldm %ld.%02lds", /* -> m:s. */
resp->ru.ru_stime.tv_sec / 60,
resp->ru.ru_stime.tv_sec % 60,
- resp->ru.ru_stime.tv_sec / 10000);
+ resp->ru.ru_stime.tv_usec / 10000);
break;
case 'U': /* User time. */
fprintf (fp, "%ld.%02ld",
@@ -330,12 +330,12 @@ static void summarize (FILE *fp, const char *fmt, char **command, resource_t *re
fprintf (fp, "%ldh %ldm %02lds",
resp->ru.ru_utime.tv_sec / 3600,
(resp->ru.ru_utime.tv_sec % 3600) / 60,
- resp->ru.ru_utime.tv_sec % 60);
+ resp->ru.ru_utime.tv_usec % 60);
else
fprintf (fp, "%ldm %ld.%02lds", /* -> m:s. */
resp->ru.ru_utime.tv_sec / 60,
resp->ru.ru_utime.tv_sec % 60,
- resp->ru.ru_utime.tv_sec / 10000);
+ resp->ru.ru_utime.tv_usec / 10000);
break;
case 'W': /* Times swapped out. */
fprintf (fp, "%ld", resp->ru.ru_nswap);