diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-07-24 21:37:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-07-24 21:37:39 +0000 |
commit | 3462c3432604442c5535488dad080153322f7a18 (patch) | |
tree | 8c0e3c3f4aa7ebfcdf3677daa90e103ad41dbdb2 /cpukit/score/src/timespecdivide.c | |
parent | 2007-07-24 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-3462c3432604442c5535488dad080153322f7a18.tar.bz2 |
2007-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c,
score/src/timespecdivide.c: Fix various math and reporting bugs. Now
the time appears to be reported correctly and add up to what is
expected.
Diffstat (limited to 'cpukit/score/src/timespecdivide.c')
-rw-r--r-- | cpukit/score/src/timespecdivide.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/score/src/timespecdivide.c b/cpukit/score/src/timespecdivide.c index 74d6cdbc78..c40d02757f 100644 --- a/cpukit/score/src/timespecdivide.c +++ b/cpukit/score/src/timespecdivide.c @@ -17,6 +17,8 @@ #include "config.h" #endif +#include <stdio.h> + #include <rtems/system.h> #include <sys/types.h> #include <rtems/score/timespec.h> @@ -50,7 +52,7 @@ void _Timespec_Divide( * Put it back in the timespec result */ - answer = (left * 1000) / right; + answer = (left * 100000) / right; *fval_percentage = answer % 1000; *ival_percentage = answer / 1000; |