diff options
author | root <root> | 2007-11-11 00:05:59 +0000 |
---|---|---|
committer | root <root> | 2007-11-11 00:05:59 +0000 |
commit | cf2e067e143e40c3b874a16069773fe04d3737bc (patch) | |
tree | d1acc57bca63c3875f5f0701828d86a17a346015 | |
parent | d1d02ca0040b567cfc3081701b52b0361412a444 (diff) |
make timers best-effort non-drifting
-rw-r--r-- | ev.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |