X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cd0b170911637899ac3c126367ee5821f357c185..cf471cab8277f4cc2c19bce417356badf9e2ca49:/src/common/timercmn.cpp?ds=sidebyside diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index 64dbb0aac2..15d1abc07e 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -89,14 +89,14 @@ void wxStopWatch::Start(long t) m_pause = 0; } -long wxStopWatch::Time() const +inline long wxStopWatch::GetElapsedTime() const { - return (m_pause ? m_pause : GetElapsedTime()); + return (wxGetLocalTimeMillis() - m_t0).GetLo(); } -long wxStopWatch::GetElapsedTime() const +long wxStopWatch::Time() const { - return (wxGetLocalTimeMillis() - m_t0).GetLo(); + return (m_pause ? m_pause : GetElapsedTime()); } // ---------------------------------------------------------------------------- @@ -233,6 +233,8 @@ wxLongLong wxGetLocalTimeMillis() { return (val + tp.millitm); } +#else +#warning "wxStopWatch will be up to second resolution!" #endif return val;