bk: 425b54128FgANOyZy7_n2FCZVtqCWw
* Update the jitter estimate.
*/
etemp = SQUARE(clock_jitter);
- dtemp = max(abs(fp_offset - last_offset),
- LOGTOD(sys_precision));
- clock_jitter = SQRT(etemp + (SQUARE(dtemp) - etemp) /
- CLOCK_AVG);
+ dtemp = SQUARE(max(fabs(fp_offset - last_offset),
+ LOGTOD(sys_precision)));
+ clock_jitter = SQRT(etemp + (dtemp - etemp) / CLOCK_AVG);
/*
* The huff-n'-puff filter finds the lowest delay in the recent
sys_reftime = sys_peer->rec;
sys_rootdelay = sys_peer->rootdelay + sys_peer->delay;
dtemp = sys_peer->disp + clock_phi * (current_time -
- sys_peer->epoch) + sys_peer->jitter +
+ sys_peer->epoch) + sys_jitter +
fabs(sys_peer->offset);
#ifdef REFCLOCK
if (!(sys_peer->flags & FLAG_REFCLOCK) && dtemp <