]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/timerunx.cpp
add wxScrollHelper::ShowScrollbars() (implemented for GTK only right now, generic...
[wxWidgets.git] / src / unix / timerunx.cpp
index 158736fcb3a5a0caa8a68230515d2a15b47488f8..c3c563af04ff219d91dfd0a8c20c31f3bf94d699 100644 (file)
@@ -172,7 +172,11 @@ void wxTimerScheduler::NotifyExpired()
         }
         else // reschedule the next timer expiration
         {
-            s->m_expiration += timer->GetInterval()*1000;
+            // always keep the expiration time in the future, i.e. base it on
+            // the current time instead of just offsetting it from the current
+            // expiration time because it could happen that we're late and the
+            // current expiration time is (far) in the past
+            s->m_expiration = now + timer->GetInterval()*1000;
             DoAddTimer(s);
         }