I'm not quite sure what you mean.  A reference clock doesn't compute an
offset, it acquires, formats and returns a time value from an external
source.  NTP takes care of the rest.

-----Original Message-----
From: questions-bounces+gdowd=symmetricom....@lists.ntp.org
[mailto:questions-bounces+gdowd=symmetricom....@lists.ntp.org] On Behalf
Of Juergen Kosel
Sent: Thursday, December 11, 2008 10:53 AM
To: questions@lists.ntp.org
Subject: [ntp:questions] how to write a reference clock driver

Hello,

I have a system with hardware support for PTP (IEEE 1588 time
synchronisation) [ http://en.wikipedia.org/wiki/Precision_Time_Protocol
].
So the system can read from two 32 bit registers seconds and nanoseconds
since 1.1.1970. It appears like the system time, but is n't the system
time.
To synchronize the system time to the PTP synchronized time and to
provide it to other systems, I want to write a reference clock driver.

I have already read http://www.eecis.udel.edu/~mills/ntp/html/howto.html
and started with a copy of refclock_local.c.
But from the documentation it is not clear, in what way the offset
should be calculated and used. E.g.:
offset = ref_clock_time - system_time;
or
offset = system_time - ref_clock_time;


Greetings
        Juergen

_______________________________________________
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions
_______________________________________________
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to