source:
MondoRescue/tags/3.3.0/mindi-busybox/networking/ntpd.diff@
3767
Last change on this file since 3767 was 3621, checked in by , 8 years ago | |
---|---|
File size: 679 bytes |
-
networking/ntpd.c
This patch scales down small offsets quadratically. Reduces sensitivity to jitter diff --git a/networking/ntpd.c b/networking/ntpd.c index 4695c33..ac05815 100644
a b update_local_clock(peer_t *p) 1654 1654 */ 1655 1655 if (G.offset_to_jitter_ratio >= TIMECONST_HACK_GATE) 1656 1656 tmx.constant--; 1657 1658 { 1659 double d = p->lastpkt_delay; 1660 if (d > SLEW_THRESHOLD) 1661 d = SLEW_THRESHOLD; 1662 d /= 2; 1663 if ((abs_offset / d) < 1) { 1664 offset *= (abs_offset / d); 1665 } 1666 } 1667 1657 1668 tmx.offset = (long)(offset * 1000000); /* usec */ 1658 1669 if (SLEW_THRESHOLD < STEP_THRESHOLD) { 1659 1670 if (tmx.offset > (long)(SLEW_THRESHOLD * 1000000)) {
Note:
See TracBrowser
for help on using the repository browser.