X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80cac95edb744966f52e63ecaed4e8fd370ace72..5c62cb6c7dfce1fac3ec9ac23cfef8cd2a043214:/src/stc/PlatWX.cpp?ds=sidebyside diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 6f8763df77..ba0af83d73 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -543,13 +543,11 @@ void Window::Show(bool show) { void Window::InvalidateAll() { GETWIN(id)->Refresh(false); - wxWakeUpIdle(); } void Window::InvalidateRectangle(PRectangle rc) { wxRect r = wxRectFromPRectangle(rc); GETWIN(id)->Refresh(false, &r); - wxWakeUpIdle(); } void Window::SetFont(Font &font) { @@ -1342,11 +1340,20 @@ int Platform::DBCSCharMaxLength() { //---------------------------------------------------------------------- ElapsedTime::ElapsedTime() { - wxStartTimer(); + wxLongLong localTime = wxGetLocalTimeMillis(); + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); } double ElapsedTime::Duration(bool reset) { - double result = wxGetElapsedTime(reset); + wxLongLong prevTime(bigBit, littleBit); + wxLongLong localTime = wxGetLocalTimeMillis(); + if(reset) { + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); + } + wxLongLong duration = localTime - prevTime; + double result = duration.ToDouble(); result /= 1000.0; return result; }