Re: Post processing of NTP data...



Val Schmidt wrote:

I've embedded some further questions below.

By the way, thanks for the insight.

On Sep 27, 2005, at 5:05 AM, Brad Knowles wrote:

At 5:08 PM -0400 2005-09-26, Val Schmidt wrote:


I want to log several things with time stamps on the order of ~ . 1ms -
maybe less.



Most modern OSes don't allow you to directly achieve better than 10-20ms accuracy at the level of an individual event. Some real-time operating systems (RTOSes) may allow you to achieve finer resolution at that level, but I don't know if any of them are going to let you get down to the level you want.


Can you help me understand why?

Many operating systems update the clock at ten millisecond intervals; e.g. the clock "ticks" at 100 Hz. When queried as to the time using O/S services, these systems respond with the current value of the clock register. The maximum error is thus 9.99999... milliseconds and the typical error is 5 milliseconds. Some very new hardware designs allow ntpd to interpolate between "ticks" and yield a much more precise time, if and only if, you use NTP supplied functions to get the time. I seem to recall that Windows uses some really odd interval like 17 milliseconds between "ticks". Linux can optionally update the clock every millisecond (1 KHz tick rate) but this doesn't work very well as the system tends to lose clock interrupts when it gets busy.

Most applications simply do not require precise and accurate time and general purpose computers are generally not designed for precise and accurate timing.


.



Relevant Pages

  • Re: best gps receiver for time synchronization
    ... - with operating system calls, the main clock can be read with a ... are seeing actual 1ms clock ticks, as the result of ntpd forcing the ... call was and the structure it returns only goes down to milliseconds. ...
    (comp.protocols.time.ntp)
  • Re: real time clock running at double speed
    ... Get your watch or a wall clock with a second hand. ... to pass the parameter "noapic" as a kernel boot parameter. ... So I got 5978 ticks in about 6000 ... milliseconds or one tick per millisecond. ...
    (comp.os.linux.setup)
  • Re: Time dilation
    ... |>| an Earth clock as it leaves Earth, travels to a point a fixed distance, ... The moving clock transmits by radio its clocks ticks ... In other words, time must be allowed for the ticks to reach the observer, ...
    (sci.physics.relativity)
  • Re: Uncle assAl: (SR) Lorentz t, x = Intervals
    ... :>: lurkers are disappointed with you Androcles. ... Assume that Terrance SEES 60*60*24*365*14 ticks on HIS OWN clock ... How many ticks does Terence count? ... Terrance SEES 60*60*24*365*14 ticks of HIS OWN clock. ...
    (sci.math)
  • Re: Uncle assAl: (SR) Lorentz t, x = Intervals
    ... :>: lurkers are disappointed with you Androcles. ... Assume that Terrance SEES 60*60*24*365*14 ticks on HIS OWN clock ... How many ticks does Terence count? ... Terrance SEES 60*60*24*365*14 ticks of HIS OWN clock. ...
    (sci.physics)