Fix computation of the event loop timeout in case of no timers.