summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-05-20 23:49:41 +0000
committerroot <root>2008-05-20 23:49:41 +0000
commit0dbf95cdb88bc0b17ce3e02ca405c1905b98c344 (patch)
tree003857ed483d45909ab394e05c6b49d67959b48c /ev.c
parentc204ee30e962b3af31eb37c9ba3154d5cebaba04 (diff)
timing changes, from <= to <
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ev.c b/ev.c
index 3147d40..abff2a2 100644
--- a/ev.c
+++ b/ev.c
@@ -1603,7 +1603,7 @@ idle_reify (EV_P)
void inline_size
timers_reify (EV_P)
{
- while (timercnt && ANHE_at (timers [HEAP0]) <= mn_now)
+ while (timercnt && ANHE_at (timers [HEAP0]) < mn_now)
{
ev_timer *w = (ev_timer *)ANHE_w (timers [HEAP0]);
@@ -1632,7 +1632,7 @@ timers_reify (EV_P)
void inline_size
periodics_reify (EV_P)
{
- while (periodiccnt && ANHE_at (periodics [HEAP0]) <= ev_rt_now)
+ while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now)
{
ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]);
@@ -1641,9 +1641,9 @@ periodics_reify (EV_P)
/* first reschedule or stop timer */
if (w->reschedule_cb)
{
- ev_at (w) = w->reschedule_cb (w, ev_rt_now + TIME_EPSILON);
+ ev_at (w) = w->reschedule_cb (w, ev_rt_now);
- assert (("ev_periodic reschedule callback returned time in the past", ev_at (w) > ev_rt_now));
+ assert (("ev_periodic reschedule callback returned time in the past", ev_at (w) >= ev_rt_now));
ANHE_at_set (periodics [HEAP0]);
downheap (periodics, periodiccnt, HEAP0);
@@ -1653,7 +1653,7 @@ periodics_reify (EV_P)
ev_at (w) = w->offset + ceil ((ev_rt_now - w->offset) / w->interval) * w->interval;
if (ev_at (w) - ev_rt_now <= TIME_EPSILON) ev_at (w) += w->interval;
- assert (("ev_periodic timeout in the past detected while processing timers, negative interval?", ev_at (w) > ev_rt_now));
+ assert (("ev_periodic timeout in the past detected while processing timers, negative interval?", ev_at (w) >= ev_rt_now));
ANHE_at_set (periodics [HEAP0]);
downheap (periodics, periodiccnt, HEAP0);