]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxGetLocalTimesMillis using HAVE_GETTIMEOFDAY\nPlease fix the others...\nThen...
authorSylvain Bougnoux <bougnoux@imra-europe.com>
Wed, 16 Feb 2000 13:05:55 +0000 (13:05 +0000)
committerSylvain Bougnoux <bougnoux@imra-europe.com>
Wed, 16 Feb 2000 13:05:55 +0000 (13:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/timercmn.cpp

index c350e8ca5bfad362b459eddefc70c83883e88777..4cb3e51b1717988a3f03163012b54871d9679519 100644 (file)
@@ -109,13 +109,12 @@ void wxTimerBase::Notify()
 void wxStopWatch::Start(long t)
 {
     m_t0 = wxGetLocalTimeMillis() - t;
 void wxStopWatch::Start(long t)
 {
     m_t0 = wxGetLocalTimeMillis() - t;
-
     m_pause = 0;
 }
 
 long wxStopWatch::GetElapsedTime() const
 {
     m_pause = 0;
 }
 
 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;
     if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
     {
     struct timeval tp;
     if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
     {
+        val *= tp.tv_sec;
         return (val + (tp.tv_usec / 1000));
     }
 #elif defined(HAVE_FTIME)
         return (val + (tp.tv_usec / 1000));
     }
 #elif defined(HAVE_FTIME)