This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]