[ntp:questions] Re: How application get precise time from Win NT/XP system time that synchronies to NTP
Bjorn Gabrielsson
bg at lysator.liu.se
Sat Mar 26 21:00:13 UTC 2005
david at djwhome.demon.co.uk (David Woolley) writes:
> In article <mailman.0.1111835963.588.questions at lists.ntp.isc.org>,
> Roger Chou <rgr.chou at gmail.com> wrote:
>
> > My applications is to do time stamp that need 10 microsecond accuracy. Many
>
> The only thing that you will timestamp to that accuracy on a general
> purpose OS is the reading of the cycle counter or the residual count
> in the CTC.
True if you need that accuracy 99.9999% of the samples. If 95-98% is
enough, I have done it on Linux with the TIOCMIWAIT ioctl. I got
inspiration from Jonathan Buzzards radioclkd. phk has an excellent
paper on
http://phk.freebsd.dk/soekris/pps/
> You may need special hardware that timestamps the external event so as
> to remove the time dependency in subsequent processing.
Roger's Trimble does just that.
> You may well need the full source code of the OS to work to 10 microseconds
> (NTP may manage to keep time to that accuracy, but only because its corrections
> are averaged over a long period of time).
NTP timestamps most PPS pulses better than 1us on a suitable
configured OS.
-- Björn
More information about the questions
mailing list