[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inaccurate time measurements. Help Please
- Date: Sun, 7 Mar 2004 02:45:59 -0800 (PST)
- From: svasn_rtems at yahoo.com (sashti srinivasan)
- Subject: Inaccurate time measurements. Help Please
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
I want an accuracy of 1 microsecond on pc386
bsp. Hence I did the following.
#define CONFIGURE_MICROSECONDS_PER_TICK 1
Now, I am able to get non-zero time intervals
succesfully. Previously all the time invervals I
calculated were zero.
To check whether the times are reliable, I did
print "Time Measurement starts\n"
Do gettimeofday() again
Print the difference between the two times.
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
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster