From 4f3ac409263ef169b015057f2718c6a98498f163 Mon Sep 17 00:00:00 2001 From: Sylvain Bougnoux Date: Wed, 29 Sep 1999 19:51:04 +0000 Subject: [PATCH] Change wxGetCurrentUTime as wxGetCurrentMTime (milli not micro!) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/timer.h | 2 +- src/common/timercmn.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/wx/timer.h b/include/wx/timer.h index 93d3f94f7c..0dd07e0bed 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -46,7 +46,7 @@ bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved); long WXDLLEXPORT wxGetCurrentTime(); // Get number of milliseconds since 00:00:00 GMT, Jan 1st 1970. -long WXDLLEXPORT wxGetCurrentUTime(); +long WXDLLEXPORT wxGetCurrentMTime(); #endif // _WX_TIMER_H_BASE_ diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index db6eeee6b8..b1556e325e 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -73,14 +73,14 @@ extern "C" int gettimeofday(struct timeval *tp, void *); long wxStartTime = 0; void wxStartTimer(void) { - wxStartTime=wxGetCurrentUTime(); + wxStartTime=wxGetCurrentMTime(); } // Returns elapsed time in milliseconds long wxGetElapsedTime(bool resetTimer) { long oldTime = wxStartTime; - long newTime=wxGetCurrentUTime(); + long newTime=wxGetCurrentMTime(); if (resetTimer) wxStartTime = newTime; return newTime - oldTime; @@ -90,11 +90,11 @@ long wxGetElapsedTime(bool resetTimer) // Get number of seconds since 00:00:00 GMT, Jan 1st 1970. long wxGetCurrentTime(void) { - return wxGetCurrentUTime()/1000; + return wxGetCurrentMTime()/1000; } // return GMT time in millisecond -long wxGetCurrentUTime() +long wxGetCurrentMTime() { #if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || \ (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) @@ -132,25 +132,25 @@ wxChrono::wxChrono() void wxChrono::Start(long t) { - m_t0=wxGetCurrentUTime()-t; + m_t0=wxGetCurrentMTime()-t; m_pause=0; } void wxChrono::Pause() { - m_pause=wxGetCurrentUTime()-m_t0; + m_pause=wxGetCurrentMTime()-m_t0; } void wxChrono::Resume() { - m_t0=wxGetCurrentUTime()-m_pause; + m_t0=wxGetCurrentMTime()-m_pause; m_pause=0; } long wxChrono::Time() { if (m_pause) return m_pause; - return wxGetCurrentUTime()-m_t0; + return wxGetCurrentMTime()-m_t0; } -- 2.45.2