Use wxGetUTCTimeUSec() in wxStopWatch under Unix for higher precision.

If gettimeofday() is available we can achieve better than millisecond
precision (even if it usually isn't as high as microsecond), so use it as
clock source in wxStopWatch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-11-27 19:50:42 +00:00
parent e16458826d
commit 796e54ef37
2 changed files with 13 additions and 1 deletions

View File

@@ -459,7 +459,8 @@ All:
- Fix crash in wxArray::insert() overload taking iterator range (wsu).
- Added wxEventFilter class and wxEvtHandler::{Add,Remove}Filter().
- Added convenient wxCmdLineParser::AddLong{Option,Switch}() wrappers.
- Added wxStopWatch::TimeInMicro() and wxGetUTCTimeUSec().
- Added wxStopWatch::TimeInMicro() and wxGetUTCTimeUSec() and improved
wxStopWatch precision.
- Made wxGetLocalTimeMillis() really return local time, added
wxGetUTCTimeMillis() returning what this function used to return.