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:
Miroslav Lichvar
2009-11-30 13:19:55 +01:00
parent 159a9519e8
commit e9ae3d0a0b
5 changed files with 20 additions and 6 deletions

View File

@@ -275,7 +275,6 @@ read_from_socket(void *anything)
unsigned int flags = 0;
struct timeval now;
NTP_Remote_Address remote_addr;
double local_clock_err;
char cmsgbuf[256];
struct msghdr msg;
struct iovec iov;
@@ -283,7 +282,7 @@ read_from_socket(void *anything)
assert(initialised);
LCL_ReadCookedTime(&now, &local_clock_err);
SCH_GetFileReadyTime(&now);
iov.iov_base = message.arbitrary;
iov.iov_len = sizeof(message);