Fixed wxGetLocalTimesMillis using HAVE_GETTIMEOFDAY\nPlease fix the others...\nThen remove val*=wxGetLocalTime()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Sylvain Bougnoux
2000-02-16 13:05:55 +00:00
parent 2fa7c206f6
commit fd7cf53286

View File

@@ -109,13 +109,12 @@ void wxTimerBase::Notify()
void wxStopWatch::Start(long t) void wxStopWatch::Start(long t)
{ {
m_t0 = wxGetLocalTimeMillis() - t; m_t0 = wxGetLocalTimeMillis() - t;
m_pause = 0; m_pause = 0;
} }
long wxStopWatch::GetElapsedTime() const long wxStopWatch::GetElapsedTime() const
{ {
return (wxGetLocalTimeMillis() - m_t0).GetLo(); return (wxGetLocalTimeMillis() - m_t0).GetLo();
} }
long wxStopWatch::Time() const long wxStopWatch::Time() const
@@ -253,6 +252,7 @@ wxLongLong wxGetLocalTimeMillis()
struct timeval tp; struct timeval tp;
if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 ) if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
{ {
val *= tp.tv_sec;
return (val + (tp.tv_usec / 1000)); return (val + (tp.tv_usec / 1000));
} }
#elif defined(HAVE_FTIME) #elif defined(HAVE_FTIME)