[ntp:questions] help with setting up NTP on windows with a USB GPS
j.jack.wang at gmail.com
Wed Dec 2 19:19:59 UTC 2009
I got this going and everything is working well. However, comparing
NTP time to an IRIG board time with a GPS antenna, I see a difference
of 100ms. Not sure where this came from.
On Dec 2, 2:29 am, "David J Taylor" <david-tay... at blueyonder.not-this-
> > David,
> > I looked at timeGetTime() and I found it only gives out relative time
> > (since Windows was started). Is it possible to query NTP server to get
> > an accurate starting time?
> > jack
> As Dave Hart says, you would need to do a network transfer to get the time
> from NTP - that's a bit of a pain when it's running locally. A pity that
> Dave's new DLL couldn't include a very simple get current time call! Hint
> Dave! Call: GetNTPTime - returns a 64-bit value. However, a network
> query should take less than a millisecond on the local PC, so you could
> then use the timeGetTime function. The ambiguity is around 49 days, so it
> shouldn't be an issue. The other much more accurate way /may/ be to use
> QueryPerformanceCounter - a 64 bit counter running at either a few MHz or
> even at CPU-speed. Yes, it would need calibrating, and you may also have
> to deal with CPUs where the speed changes (also an issue for NTP), and
> there may also be an ambiguity issue.
> If you go the SNTP route, the packet you need is easy to construct, and
> it's on page 7 here:
> It's what my Delphi SNTP monitor program uses, and has about a dozen
> fields to complete.
More information about the questions