<$Edelta~==~roman peer.delay> ,
<$Eepsilon~==~roman peer.dispersion~=~rho~+~phi tau~+~epsilon sub sigma>
,
<$Elambda~==~epsilon~+~{ delta } over 2> ,
where <$Etau> is the interval since the original timestamp (from which
<$Etheta> and <$Edelta> were determined) was transmitted to the present
time and <$Eepsilon sub sigma> is the filter dispersion (see clock-
filter procedure below). The variables relative to the root of the
synchronization subnet via peer i are determined as follows:
<$ETHETA sub i~==~theta sub i> ,
<$EDELTA sub i~==~roman peer.rootdelay~+~delta sub i> ,
<$EEPSILON sub i~==~roman peer.rootdispersion~+~epsilon sub i~+~phi tau
sub i> ,
<$ELAMBDA sub i~==~EPSILON sub i~+~{ DELTA sub i } over 2> ,
where all variables are understood to pertain to the ith peer. Finally,
assuming the ith peer is selected for synchronization, the system
variables are determined as follows:
<$ETHETA~=~>combined final offset ,
<$EDELTA~=~DELTA sub i> ,
<$EEPSILON~=~EPSILON sub i~+~epsilon sub xi~+~ THETA > ,
<$ELAMBDA~=~LAMBDA sub i> ,
where <$Eepsilon sub xi> is the select dispersion (see clock-selection
procedure below).
Informal pseudo-code which accomplishes these computations is presented
below. Note that the pseudo-code is represented in no particular
language, although it has many similarities to the C language. Specific
details on the important algorithms are further illustrated in the C-
language routines in Appendix I.
Transmit Procedure
The transmit procedure is executed when the peer timer decrements to
zero for all modes except client mode with a broadcast server and server
mode in all cases. In client mode with a broadcast server messages are
never sent. In server mode messages are sent only in response to
received messages. This procedure is also called by the receive
procedure when an NTP message arrives that does not result in a
persistent association.
begin transmit procedure
The following initializes the packet buffer and copies the packet
variables. The value skew is necessary to account for the skew-error
accumulated over the interval since the local clock was last set.
<$Eroman pkt.peeraddr~<<-~roman peer.hostaddr>; /* copy
system and peer variables */
<$Eroman pkt.peerport~<<-~roman peer.hostport>;
<$Eroman pkt.hostaddr~<<-~roman peer.peeraddr>;