Last change
on this file since 3889 was 3621, checked in by Bruno Cornec, 8 years ago |
New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.
|
File size:
679 bytes
|
Rev | Line | |
---|
[3621] | 1 | This patch scales down small offsets quadratically. Reduces sensitivity to jitter
|
---|
| 2 |
|
---|
| 3 | diff --git a/networking/ntpd.c b/networking/ntpd.c
|
---|
| 4 | index 4695c33..ac05815 100644
|
---|
| 5 | --- a/networking/ntpd.c
|
---|
| 6 | +++ b/networking/ntpd.c
|
---|
| 7 | @@ -1654,6 +1654,17 @@ update_local_clock(peer_t *p)
|
---|
| 8 | */
|
---|
| 9 | if (G.offset_to_jitter_ratio >= TIMECONST_HACK_GATE)
|
---|
| 10 | tmx.constant--;
|
---|
| 11 | +
|
---|
| 12 | +{
|
---|
| 13 | + double d = p->lastpkt_delay;
|
---|
| 14 | + if (d > SLEW_THRESHOLD)
|
---|
| 15 | + d = SLEW_THRESHOLD;
|
---|
| 16 | + d /= 2;
|
---|
| 17 | + if ((abs_offset / d) < 1) {
|
---|
| 18 | + offset *= (abs_offset / d);
|
---|
| 19 | + }
|
---|
| 20 | +}
|
---|
| 21 | +
|
---|
| 22 | tmx.offset = (long)(offset * 1000000); /* usec */
|
---|
| 23 | if (SLEW_THRESHOLD < STEP_THRESHOLD) {
|
---|
| 24 | if (tmx.offset > (long)(SLEW_THRESHOLD * 1000000)) {
|
---|
Note:
See
TracBrowser
for help on using the repository browser.