Issue with gettimeofday() in RTEMS 4.10;
freakforever at gmail.com
Fri Jan 28 14:11:57 UTC 2011
I'm using gettimeofday() to profile a function. For this i do:
struct timeval tim;
// *Get actual clock
// *GNC Calculations starting point
// *Calculations termination point
// *Calculate elapsed time with GNC calculations.
procDelay = (t2 - t1 + 0.0275);
if (t1 > t2)
printf(" WARNING %f > %f\n",t1,t2);
But sometimes t1 is larger than t2, which should not be possible since t2 is
allways measured after t1. For instance, the above code produces the
following when this issue happens:
WARNING 567996584.559981 > 567996584.550001
The above code runs in loop and this happens roughly once in an hour (just
an estimate). Is there any known overflow issue with the usec counter that i
should be aware? RTEMS is running with a LEON-3.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users