RE: GLIBC IA64 HP_TIMING fixes for SMP systems with unsynchronized ITC

Luck, Tony
2004-06-04T22:25:56Z

>Only problem is that we can get high precision, but unless we can also
>get access to the NTP daemon's parameters, we don't know the accuracy
>of the result.
>
>Dunno about your systems, but mine drift around the real time by a
>couple of *milliseconds* so nanosecond accuracy in gettimeofday()
>won't buy much.

It depends what you are trying to do. If you want to time how long
a short event takes ... then asking for the time of day before and
after and subtracting is the obvious solution. If the event only
takes 5 micro-seconds, a one micro-second granularity in gettimeofday()
will give a +/- 20% error. Even if the absolute time you see in the
two calls is off from UTC by a couple of milli-seconds, the rate of
drift is presumably small enough for the subtraction to make sense.

-Tony