is the resolution of do_gettimeofday in usec?
Chris Friesen
cfriesen at nortel.com
Wed Jun 3 06:28:29 EST 2009
wael showair wrote:
> Hi All,
> i have board that contains MPC8555 processor with linux 2.6.27 ported to it.
> i want to use an accurate function to measure the time. i searched the
> kernel code & i found several functions but i read that the do_gettimeofday
> is the most accurate one since it has a timer resolution of usec.
You might also look at clock_gettime(), which has a theoretical accuracy
of nanoseconds. Both this and gettimeofday are NTP-corrected if you are
synced to an NTP clock.
> my question is how this function give this accuracy while the kernel timer
> is 4msec?
The accuracy of the timestamp is not related to the tick interval.
Chris
More information about the Linuxppc-dev
mailing list