From 8242fb3b6f9a46ec624c1a01daef8fde9b8bb19e Mon Sep 17 00:00:00 2001 From: Sylvain Bougnoux Date: Wed, 2 Feb 2000 16:37:56 +0000 Subject: [PATCH] Add warning if wxStopWatch is up to second resolution git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/timercmn.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; -- 2.45.2