source: MondoRescue/branches/3.3/mindi-busybox/networking/ntpd.diff@ 3734

Last change on this file since 3734 was 3621, checked in by Bruno Cornec, 10 years ago

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

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)  
    16541654     */
    16551655    if (G.offset_to_jitter_ratio >= TIMECONST_HACK_GATE)
    16561656        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
    16571668    tmx.offset = (long)(offset * 1000000); /* usec */
    16581669    if (SLEW_THRESHOLD < STEP_THRESHOLD) {
    16591670        if (tmx.offset > (long)(SLEW_THRESHOLD * 1000000)) {
Note: See TracBrowser for help on using the repository browser.