[LinuxPPS] Recommendation / Re: Stats & architectures
James Boddington
boddingt at internode.on.net
Tue Mar 18 01:08:13 CET 2008
Udo van den Heuvel wrote:
> James Boddington wrote:
>> Found http://lkml.org/lkml/2008/3/14/267 while looking for information about
>> STA_NANO. Reading that thread it looks like what I said about the offset is
>> changing. http://lkml.org/lkml/2008/3/14/273 is the post that caught my
>> attention, do_adjtimex() will accept nano or micro depending whether STA_NANO
>> is defined. STA_NANO also has a bit to do with how ntp is built.
>
> What would I need to check with ntp source?
I used grep. One bit of code from ntp_loopfilter.c
#ifdef STA_NANO
ntv.offset = (int32)(clock_offset * 1e9 +
dtemp);
ntv.constant = sys_poll;
#else /* STA_NANO */
ntv.offset = (int32)(clock_offset * 1e6 +
dtemp);
ntv.constant = sys_poll - 4;
#endif /* STA_NANO */
clock_offset is declared as a double. Cases like this where ntp uses 9 digits
if STA_NANO is defined and 6 other wise. There are also bits of code like that
for jitter.
--
James
More information about the LinuxPPS
mailing list