Bug fix from Nitin Gupta <gupta@equator.com>
This commit is contained in:
parent
2e41d0cb77
commit
92052e3945
@ -313,12 +313,12 @@ static void summarize (FILE *fp, const char *fmt, char **command, resource_t *re
|
|||||||
fprintf (fp, "%ldh %ldm %02lds",
|
fprintf (fp, "%ldh %ldm %02lds",
|
||||||
resp->ru.ru_stime.tv_sec / 3600,
|
resp->ru.ru_stime.tv_sec / 3600,
|
||||||
(resp->ru.ru_stime.tv_sec % 3600) / 60,
|
(resp->ru.ru_stime.tv_sec % 3600) / 60,
|
||||||
resp->ru.ru_stime.tv_sec % 60);
|
resp->ru.ru_stime.tv_usec % 60);
|
||||||
else
|
else
|
||||||
fprintf (fp, "%ldm %ld.%02lds", /* -> m:s. */
|
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 % 60,
|
resp->ru.ru_stime.tv_sec % 60,
|
||||||
resp->ru.ru_stime.tv_sec / 10000);
|
resp->ru.ru_stime.tv_usec / 10000);
|
||||||
break;
|
break;
|
||||||
case 'U': /* User time. */
|
case 'U': /* User time. */
|
||||||
fprintf (fp, "%ld.%02ld",
|
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",
|
fprintf (fp, "%ldh %ldm %02lds",
|
||||||
resp->ru.ru_utime.tv_sec / 3600,
|
resp->ru.ru_utime.tv_sec / 3600,
|
||||||
(resp->ru.ru_utime.tv_sec % 3600) / 60,
|
(resp->ru.ru_utime.tv_sec % 3600) / 60,
|
||||||
resp->ru.ru_utime.tv_sec % 60);
|
resp->ru.ru_utime.tv_usec % 60);
|
||||||
else
|
else
|
||||||
fprintf (fp, "%ldm %ld.%02lds", /* -> m:s. */
|
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 % 60,
|
resp->ru.ru_utime.tv_sec % 60,
|
||||||
resp->ru.ru_utime.tv_sec / 10000);
|
resp->ru.ru_utime.tv_usec / 10000);
|
||||||
break;
|
break;
|
||||||
case 'W': /* Times swapped out. */
|
case 'W': /* Times swapped out. */
|
||||||
fprintf (fp, "%ld", resp->ru.ru_nswap);
|
fprintf (fp, "%ld", resp->ru.ru_nswap);
|
||||||
|
Loading…
Reference in New Issue
Block a user