fix for the negative times in seconds.

This commit is contained in:
pnenzi 2007-06-14 10:27:35 +00:00
parent 3a7c14f53f
commit 9eb9f56060
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-06-14 Paolo Nenzi <p.nenzi@ieee.org>
* src/misc/misc_time.c: added a casting to doube in seconds function to
solve the "negative times" in acct command.
2007-05-13 Paolo Nenzi <p.nenzi@ieee.org>
* src/spicelib/devices/dev.c: updated NUMDEV to reflect actual situation.

View File

@ -104,7 +104,7 @@ seconds(void)
return (TCGTIME_());
#else
(void) getrusage(RUSAGE_SELF, &ruse);
return (ruse.ru_utime.tv_sec + (double) ruse.ru_utime.tv_usec / 1000000.0);
return ((double)ruse.ru_utime.tv_sec + (double) ruse.ru_utime.tv_usec / 1000000.0);
#endif /* PARALLEL_ARCH */
#else
#ifdef HAVE_TIMES