]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/thread.cpp
Applied patch [ 584057 ] Fixes calculation bug in wxThread::Sleep
[wxWidgets.git] / src / mac / carbon / thread.cpp
index 5ea6f21f32161da7e3e231648f847f60dab88611..474b92a22f79fb6d36f63e07b7c57e02cecf75a1 100644 (file)
@@ -523,11 +523,11 @@ void wxThread::Yield()
 
 void wxThread::Sleep(unsigned long milliseconds)
 {
-        clock_t start = clock() ;
-        do
-        {
-            YieldToAnyThread() ;
-        } while( clock() - start < milliseconds / CLOCKS_PER_SEC ) ;
+    clock_t start = clock();
+    do
+    {
+        YieldToAnyThread();
+    } while( clock() - start < (milliseconds * CLOCKS_PER_SEC) / 1000 ) ;
 }
 
 int wxThread::GetCPUCount()