Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 9 years ago
parent
commit
20625c27b8
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      ev.c

+ 7
- 2
ev.c View File

@ -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))
{


Loading…
Cancel
Save