X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/634903fd0431c5f09372a9ad99005cb4b2c5cd34..ca8b28f2efff34b9939035a7aeb1de1e3ac98a0c:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 0f5ebc51ab..3dc34fdc7e 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -299,6 +299,27 @@ class wxSleepTimer: public wxTimer static wxTimer *wxTheSleepTimer = NULL; +void wxUsleep(unsigned long milliseconds) +{ +#ifdef __WIN32__ + ::Sleep(milliseconds); +#else + if (inTimer) + return; + + wxTheSleepTimer = new wxSleepTimer; + inTimer = TRUE; + wxTheSleepTimer->Start(milliseconds); + while (inTimer) + { + if (wxTheApp->Pending()) + wxTheApp->Dispatch(); + } + delete wxTheSleepTimer; + wxTheSleepTimer = NULL; +#endif +} + void wxSleep(int nSecs) { #if 0 // WIN32 hangs app @@ -537,7 +558,6 @@ void wxEndBusyCursor() wxCHECK_RET( gs_wxBusyCursorCount > 0, "no matching wxBeginBusyCursor() for wxEndBusyCursor()" ); - gs_wxBusyCursorCount--; if ( --gs_wxBusyCursorCount == 0 ) { ::SetCursor(gs_wxBusyCursorOld);