]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/PlatWX.cpp
Include wx/dialog.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / contrib / src / stc / PlatWX.cpp
index 6f8763df77cda0fc8364ccf119aa123bfeec463c..f0d9d17603c195acc2aaa946089d03f652c2c40e 100644 (file)
@@ -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;
 }