mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 16:55:06 -05:00
Read local time immediately after select()
This removes a small inaccuracy caused by delay between select() and file handler calls.
This commit is contained in:
@@ -436,7 +436,6 @@ read_from_socket(void *anything)
|
||||
IPAddr remote_ip;
|
||||
int i, ok;
|
||||
struct timeval now;
|
||||
double local_time_err;
|
||||
SourceRecord *src;
|
||||
|
||||
flags = 0;
|
||||
@@ -444,7 +443,7 @@ read_from_socket(void *anything)
|
||||
his_addr_len = sizeof(his_addr);
|
||||
|
||||
/* Get timestamp */
|
||||
LCL_ReadCookedTime(&now, &local_time_err);
|
||||
SCH_GetFileReadyTime(&now);
|
||||
|
||||
sock_fd = (long)anything;
|
||||
status = recvfrom (sock_fd, (char *)&msg, message_length, flags,
|
||||
|
||||
Reference in New Issue
Block a user