- /* when we got a signal, we get EINTR. we do not care,
- because we check current time in timers anyway. */
- if (errno != EINTR)
- eDebug("poll made error");
+ /* we know that this time has passed. */
+ now += poll_timeout;
+
+ singleLock s(recalcLock);
+
+ /* this will never change while we have the recalcLock */
+ /* we can savely return here, the timer will be re-checked soon. */
+ if (m_now_is_invalid)
+ return;
+
+ /* process all timers which are ready. first remove them out of the list. */
+ while ((!m_timer_list.empty()) && (m_timer_list.begin()->getNextActivation() <= now))
+ m_timer_list.begin()->activate();