updates.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 24 Jun 2001 13:34:38 +0000 (13:34 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 24 Jun 2001 13:34:38 +0000 (13:34 +0000)
lib/silcutil/win32/silcwin32schedule.c

index 6b38e5148d6c8407d75744fab0f20d1632259e24..6db27fd7e24b6133095188a02bf5509cfca817d3 100644 (file)
@@ -79,24 +79,16 @@ int silc_select(int n, fd_set *readfds, fd_set *writefds,
      and wait just for windows messages. */
   if (nhandles == 0 && timeout) {
     UINT timer = SetTimer(NULL, 0, timeo, NULL);
-    curtime = GetTickCount();
-    while (timer)
+    if (timer) {
       WaitMessage();
       KillTimer(NULL, timer);
 
       while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
-       if (msg.message == WM_TIMER)
-         return 0;
        TranslateMessage(&msg); 
        DispatchMessage(&msg); 
       }
 
-      if (timeo != INFINITE) {
-       timeo -= GetTickCount() - curtime;
-       if (timeo < 0)
-         timeo = 0;
-       timer = SetTimer(NULL, 0, timeo, NULL);
-      }
+      return 0;
     }
   }