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

@@ -60,6 +60,10 @@ extern void SCH_AddInputFileHandler
);
extern void SCH_RemoveInputFileHandler(int fd);
/* Get the time (cooked) when file descriptor became ready, intended for use
in file handlers */
extern void SCH_GetFileReadyTime(struct timeval *tv);
/* This queues a timeout to elapse at a given (raw) local time */
extern SCH_TimeoutID SCH_AddTimeout(struct timeval *tv, SCH_TimeoutHandler, SCH_ArbitraryArgument);