summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2011-06-08 13:11:55 +0000
committerroot <root>2011-06-08 13:11:55 +0000
commitf16fbd21ee467f0069e6e9c21be59ec41c9847af (patch)
treeb9f1c03a29f051c15442d9a221c9129582733f68
parent01ce16a883554758e28c6874dbd610a75712dc5c (diff)
*** empty log message ***
-rw-r--r--ev.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ev.c b/ev.c
index 729b7a4..6792e3f 100644
--- a/ev.c
+++ b/ev.c
@@ -2507,14 +2507,14 @@ ev_run (EV_P_ int flags)
if (timercnt)
{
- ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now + backend_mintime;
+ ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now;
if (waittime > to) waittime = to;
}
#if EV_PERIODIC_ENABLE
if (periodiccnt)
{
- ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now + backend_mintime;
+ ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now;
if (waittime > to) waittime = to;
}
#endif
@@ -2523,6 +2523,11 @@ ev_run (EV_P_ int flags)
if (expect_false (waittime < timeout_blocktime))
waittime = timeout_blocktime;
+ /* at this point, we NEED to wait, so we have to ensure */
+ /* to pass a minimum nonzero value to the backend */
+ if (expect_false (waittime < backend_mintime))
+ waittime = backend_mintime;
+
/* extra check because io_blocktime is commonly 0 */
if (expect_false (io_blocktime))
{