The poll-update procedure is called when a significant event occurs that may result in a change of the poll interval or peer timer. It checks the values of the host poll interval (peer.hostpoll) and peer poll interval (peer.peerpoll) and clamps each within the valid range. If the peer is selected for synchronization, the value is further clamped as a function of the computed compliance (see Section 5).
begin poll-update procedure temp <-- peer.hostpoll; /* determine host poll interval */ if (peer = sys.peer) temp <-- min (temp, sys.poll, NTP.MAXPOLL); else temp <-- min (temp,NTP.MAXPOLL); peer.hostpoll <-- max (temp, NTP.MINPOLL); temp <-- 1 << min ( peer.hostpoll, max (peer.peerpoll, NTP.MINPOLL));
If the poll interval is unchanged and the peer timer is zero, the timer is simply reset. If the poll interval is changed and the new timer value is greater than the present value, no additional action is necessary; otherwise, the peer timer must be reduced. When the peer timer must be reduced it is important to discourage tendencies to synchronize transmissions between the peers. A prudent precaution is to randomize the first transmission after the timer is reduced, for instance by the sneaky technique illustrated.
if (peer.timer = 0) /* reset peer timer */ peer.timer <-- temp; else if ( peer.timer > temp) peer.timer <-- ( sys.clock & (temp -1))+ 1; end poll-update procedure;