X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1a527fbc0a04e474a0fdafe989db43f1eb2b7710..5f254b1f3cf48ea4483aa9a728d1addb0b1f1e23:/src/mac/carbon/thread.cpp diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index ef01ae9b20..db758b346f 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -38,7 +38,7 @@ #include #include "wx/mac/uma.h" #include "wx/mac/macnotfy.h" -#include "Timer.h" +#include #endif #define INFINITE 0xFFFFFFFF @@ -524,7 +524,11 @@ bool wxThread::IsMain() void wxThread::Yield() { +#if TARGET_API_MAC_OSX + CFRunLoopRunInMode( kCFRunLoopDefaultMode , 0 , true ) ; +#endif ::YieldToAnyThread() ; + } void wxThread::Sleep(unsigned long milliseconds) @@ -542,7 +546,7 @@ void wxThread::Sleep(unsigned long milliseconds) YieldToAnyThread(); Microseconds(&now); msnow = (now.hi * 4294967296.0 + now.lo) ; - } while( msstart - msnow < mssleep ); + } while( msnow - msstart < mssleep ); } int wxThread::GetCPUCount()