]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/timer.cpp
Fixed toolbar crash for MinGW/Cygwin
[wxWidgets.git] / src / x11 / timer.cpp
index ec9eaedb1087b437099f8c5a478272c5c5f7f9c3..adf095d4aba90bd2703bf523342a19ca9a8ecb69 100644 (file)
@@ -62,9 +62,12 @@ void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
 {
     if ( desc->running )
         return; // already scheduled
-        
+      
     if ( when == 0 )
-        when = wxGetLocalTimeMillis() + desc->timer->GetInterval();
+    {
+        unsigned long local = wxGetLocalTimeMillis().ToLong();
+        when = local + desc->timer->GetInterval();
+    }
     desc->shotTime = when;
     desc->running = TRUE;
 
@@ -106,7 +109,7 @@ void wxTimerScheduler::NotifyTimers()
     {
         bool oneShot;
         volatile bool timerDeleted;
-        unsigned long now = wxGetLocalTimeMillis();
+        unsigned long now = wxGetLocalTimeMillis().ToLong();
         wxTimerDesc *desc;
 
         while ( m_timers && m_timers->shotTime <= now )