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

@@ -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,