[ntp:questions] Time synchronization
nomail at example.com
Sat Feb 21 12:15:30 UTC 2009
I think the value returned by the gettimeofday function will probably
have a worse resolution on the MOXA board than it has on the PC.
That will make it difficult to get a low offset value, as the gpsd process
sends the gettimeofday value at the time of the PPS pulse to ntpd via
the shared memory block. That is how the shared memory (SHM) interface
works. When the gettimeofday on the MOXA board only returns values with
a 10ms or 20ms resolution, the jitter value will be high and the offset
will never be very low.
On the PC platform, various methods are used to get a very good resolution
on the gettimeofday function. The chips on your board may not have that
You could compile a simple test program like this:
struct timeval t;
for (i = 0;i < 25;i++)
Then run it. Try it on your different boards. You will see if there
is some big increment in the printed value, ideally you should see only
small steps in the last digit.
More information about the questions