From: Eric Andersen Date: Fri, 27 Sep 2002 23:34:53 +0000 (-0000) Subject: Bug fix from Nitin Gupta X-Git-Tag: 0_60_5~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=92052e3945820f50e71737658997cc35ed287105;p=oweals%2Fbusybox.git Bug fix from Nitin Gupta --- diff --git a/miscutils/time.c b/miscutils/time.c index 24a5b9aae..3a44b18c8 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);