X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d35ad26eee38a8d71efde5a6e7f7f28f4b7df1bd..fdf565feca722eddb84168a95dbef329ba23d719:/contrib/src/stc/PlatWX.cpp diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 7b40662901..f0d9d17603 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -919,7 +919,7 @@ private: bool unicodeMode; int desiredVisibleRows; int aveCharWidth; - int maxStrWidth; + size_t maxStrWidth; Point location; // Caret location at which the list is opened wxImageList* imgList; wxArrayInt* imgTypeMap; @@ -1342,11 +1342,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; }