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
This commit is contained in:
@@ -89,16 +89,16 @@ void wxStopWatch::Start(long t)
|
|||||||
m_pause = 0;
|
m_pause = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline long wxStopWatch::GetElapsedTime() const
|
||||||
|
{
|
||||||
|
return (wxGetLocalTimeMillis() - m_t0).GetLo();
|
||||||
|
}
|
||||||
|
|
||||||
long wxStopWatch::Time() const
|
long wxStopWatch::Time() const
|
||||||
{
|
{
|
||||||
return (m_pause ? m_pause : GetElapsedTime());
|
return (m_pause ? m_pause : GetElapsedTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
long wxStopWatch::GetElapsedTime() const
|
|
||||||
{
|
|
||||||
return (wxGetLocalTimeMillis() - m_t0).GetLo();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// old timer functions superceded by wxStopWatch
|
// old timer functions superceded by wxStopWatch
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -233,6 +233,8 @@ wxLongLong wxGetLocalTimeMillis()
|
|||||||
{
|
{
|
||||||
return (val + tp.millitm);
|
return (val + tp.millitm);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#warning "wxStopWatch will be up to second resolution!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
Reference in New Issue
Block a user