"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ntpd/ntp_refclock.c" between
ntp-4.2.8p14.tar.gz and ntp-4.2.8p15.tar.gz

About: NTP is the the Official Reference Implementation of the Network Time Protocol (NTP) that synchronize the clocks of computers over a network.

ntp_refclock.c  (ntp-4.2.8p14):ntp_refclock.c  (ntp-4.2.8p15)
skipping to change at line 609 skipping to change at line 609
offset = off[(j + i) / 2]; offset = off[(j + i) / 2];
if (off[j - 1] - offset < offset - off[i]) if (off[j - 1] - offset < offset - off[i])
i++; /* reject low end */ i++; /* reject low end */
else else
j--; /* reject high end */ j--; /* reject high end */
} }
/* /*
* Determine the offset and jitter. * Determine the offset and jitter.
*/ */
pp->offset = 0; pp->offset = off[i];
pp->jitter = 0; pp->jitter = 0;
for (k = i; k < j; k++) { for (k = i + 1; k < j; k++) {
pp->offset += off[k]; pp->offset += off[k];
if (k > i) pp->jitter += SQUARE(off[k] - off[k - 1]);
pp->jitter += SQUARE(off[k] - off[k - 1]);
} }
pp->offset /= m; pp->offset /= m;
m -= (m > 1); /* only (m-1) terms attribute to jitter! */
pp->jitter = max(SQRT(pp->jitter / m), LOGTOD(sys_precision)); pp->jitter = max(SQRT(pp->jitter / m), LOGTOD(sys_precision));
/* /*
* If the source has a jitter that cannot be estimated, because * If the source has a jitter that cannot be estimated, because
* it is not statistic jitter, the source will be detected as * it is not statistic jitter, the source will be detected as
* falseticker sooner or later. Enforcing a minimal jitter value * falseticker sooner or later. Enforcing a minimal jitter value
* avoids a too low estimation while still detecting higher jitter. * avoids a too low estimation while still detecting higher jitter.
* *
* Note that this changes the refclock samples and ends up in the * Note that this changes the refclock samples and ends up in the
* clock dispersion, not the clock jitter, despite being called * clock dispersion, not the clock jitter, despite being called
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)