X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/92344af49ee4ba16adc8fadb616ed750e13c4ca1..cf2e067e143e40c3b874a16069773fe04d3737bc:/ev.c diff --git a/ev.c b/ev.c index 28ed91b..a605a57 100644 --- a/ev.c +++ b/ev.c @@ -989,7 +989,11 @@ timers_reify (EV_P) if (w->repeat) { assert (("negative ev_timer repeat value found while processing timers", w->repeat > 0.)); - ((WT)w)->at = mn_now + w->repeat; + + ((WT)w)->at += w->repeat; + if (((WT)w)->at < mn_now) + ((WT)w)->at = mn_now; + downheap ((WT *)timers, timercnt, 0); } else