int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout)
{
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
- DWORD ready, curtime, timeo;
+ DWORD ready, curtime;
+ LONG timeo;
int nhandles = 0, i;
MSG msg;
KillTimer(NULL, timer);
if (timeo != INFINITE) {
timeo -= GetTickCount() - curtime;
+ curtime = GetTickCount();
if (timeo < 0)
timeo = 0;
}
return and we will give the wait another try. */
if (timeo != INFINITE) {
timeo -= GetTickCount() - curtime;
+ curtime = GetTickCount();
if (timeo < 0)
timeo = 0;
}