minimum timeout for SetTimer should be 10ms

Mike McCormack mike at codeweavers.com
Tue Jan 6 11:07:09 CST 2004


MSDN defines 10ms as the minimum timeout for Win 2000. Win9x is not 
defined, but tests show it is slightly different... it's minimum timeout 
is longer than 10ms, but setting to 10ms should not hurt.

Mike


ChangeLog:
* minimum timeout for SetTimer should be 10ms
-------------- next part --------------
Index: windows/timer.c
===================================================================
RCS file: /home/wine/wine/windows/timer.c,v
retrieving revision 1.44
diff -u -r1.44 timer.c
--- windows/timer.c	26 Nov 2003 22:29:30 -0000	1.44
+++ windows/timer.c	6 Jan 2004 16:37:42 -0000
@@ -137,11 +137,14 @@
         return 0;
     }
 
-    if (!timeout)
-      {       /* timeout==0 is a legal argument  UB 990821*/
-       WARN("Timeout== 0 not implemented, using timeout=1\n");
-        timeout=1;
-      }
+    if (timeout<10)
+    {
+        /* 
+         * according to MSDN, on win2000
+         *   we should set timeout to 10 if it is less than 10
+         */
+        timeout=10;
+    }
 
     EnterCriticalSection( &csTimer );
 


More information about the wine-patches mailing list