mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 04:55:06 -05:00
Use UTI_DiffTimevalsToDouble to calculate theta
This commit is contained in:
@@ -927,8 +927,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
|
|||||||
/* Calculate theta. Following the NTP definition, this is negative
|
/* Calculate theta. Following the NTP definition, this is negative
|
||||||
if we are fast of the remote source. */
|
if we are fast of the remote source. */
|
||||||
|
|
||||||
theta = (double) (remote_average.tv_sec - local_average.tv_sec) +
|
UTI_DiffTimevalsToDouble(&theta, &remote_average, &local_average);
|
||||||
(double) (remote_average.tv_usec - local_average.tv_usec) * 1.0e-6;
|
|
||||||
|
|
||||||
/* We treat the time of the sample as being midway through the local
|
/* We treat the time of the sample as being midway through the local
|
||||||
measurement period. An analysis assuming constant relative
|
measurement period. An analysis assuming constant relative
|
||||||
|
|||||||
Reference in New Issue
Block a user