Inaccurate time measurements. Help Please

sashti srinivasan svasn_rtems at yahoo.com
Sun Mar 7 10:45:59 UTC 2004


Hello All,

     Thanks to Joel's guidance, I am able to find some
improvement in time measurement.  But I find that time
measurements are very much inaccurate(by more than
600%).  Please tell me what is wrong with what I did. 
I provide the summary of what I did and the problem
here.

Action:
      I want an accuracy of 1 microsecond on pc386
bsp.  Hence I did the following.
  #define CONFIGURE_MICROSECONDS_PER_TICK 1

Result:
      Now, I am able to get non-zero time intervals
succesfully.  Previously all the time invervals I
calculated were zero.

verification:
      To check whether the times are reliable, I did
the following.
         print "Time Measurement starts\n"
         Do gettimeofday()
         sleep(20)
         Do gettimeofday() again
         Print the difference between the two times.
       
Problem:
      By doing the above verification, the printed
result clearly shows 20000001 microseconds, but the
actual time elapsed (measured with my wrist watch)
between the two prints is more than 140 seconds. 
Please help in getting accurate measurement of time.

My platform : pc386

Regards
Srinivasan

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com



More information about the users mailing list