mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:45:07 -05:00
ntp: fix calculation of PHC sample time
This commit is contained in:
@@ -336,7 +336,7 @@ get_phc_sample(int phc_fd, struct timespec *phc_ts, struct timespec *local_ts, d
|
|||||||
assert(n);
|
assert(n);
|
||||||
|
|
||||||
UTI_AddDoubleToTimespec(&phc_tss[0], phc_sum / n, phc_ts);
|
UTI_AddDoubleToTimespec(&phc_tss[0], phc_sum / n, phc_ts);
|
||||||
UTI_AddDoubleToTimespec(&sys_tss[0], phc_sum / n, &ts1);
|
UTI_AddDoubleToTimespec(&sys_tss[0], local_sum / n, &ts1);
|
||||||
LCL_CookTime(&ts1, local_ts, NULL);
|
LCL_CookTime(&ts1, local_ts, NULL);
|
||||||
*p_delay = min_delay;
|
*p_delay = min_delay;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user