diff options
-rw-r--r-- | networking/ntpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index 47410c21e..e11160a55 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -1876,9 +1876,11 @@ update_local_clock(peer_t *p) | |||
1876 | //15:31:53.473 update from:<IP> offset:+0.000007 delay:0.158142 jitter:0.010922 clock drift:+9.343ppm tc:6 | 1876 | //15:31:53.473 update from:<IP> offset:+0.000007 delay:0.158142 jitter:0.010922 clock drift:+9.343ppm tc:6 |
1877 | //15:32:58.902 update from:<IP> offset:-0.000728 delay:0.158222 jitter:0.009454 clock drift:+9.298ppm tc:6 | 1877 | //15:32:58.902 update from:<IP> offset:-0.000728 delay:0.158222 jitter:0.009454 clock drift:+9.298ppm tc:6 |
1878 | /* | 1878 | /* |
1879 | * This expression would choose MIN_FREQHOLD + 8 in the above example. | 1879 | * This expression would choose MIN_FREQHOLD + 8 in the above example |
1880 | * (off_065 is +1 for each 0.065536 seconds of offset). | ||
1880 | */ | 1881 | */ |
1881 | G.FREQHOLD_cnt = 1 + MIN_FREQHOLD + ((unsigned)(abs(tmx.offset)) >> 16); | 1882 | unsigned off_065 = abs((int)(tmx.offset >> 16)); |
1883 | G.FREQHOLD_cnt = 1 + MIN_FREQHOLD + off_065; | ||
1882 | } | 1884 | } |
1883 | G.FREQHOLD_cnt--; | 1885 | G.FREQHOLD_cnt--; |
1884 | tmx.status |= STA_FREQHOLD; | 1886 | tmx.status |= STA_FREQHOLD; |