ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.375 by root, Sat Jun 4 05:25:03 2011 UTC vs.
Revision 1.376 by root, Sat Jun 4 05:33:29 2011 UTC

2505 { 2505 {
2506 waittime = MAX_BLOCKTIME; 2506 waittime = MAX_BLOCKTIME;
2507 2507
2508 if (timercnt) 2508 if (timercnt)
2509 { 2509 {
2510 ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now + backend_fudge; 2510 ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now + backend_mintime;
2511 if (waittime > to) waittime = to; 2511 if (waittime > to) waittime = to;
2512 } 2512 }
2513 2513
2514#if EV_PERIODIC_ENABLE 2514#if EV_PERIODIC_ENABLE
2515 if (periodiccnt) 2515 if (periodiccnt)
2516 { 2516 {
2517 ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now + backend_fudge; 2517 ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now + backend_mintime;
2518 if (waittime > to) waittime = to; 2518 if (waittime > to) waittime = to;
2519 } 2519 }
2520#endif 2520#endif
2521 2521
2522 /* don't let timeouts decrease the waittime below timeout_blocktime */ 2522 /* don't let timeouts decrease the waittime below timeout_blocktime */
2526 /* extra check because io_blocktime is commonly 0 */ 2526 /* extra check because io_blocktime is commonly 0 */
2527 if (expect_false (io_blocktime)) 2527 if (expect_false (io_blocktime))
2528 { 2528 {
2529 sleeptime = io_blocktime - (mn_now - prev_mn_now); 2529 sleeptime = io_blocktime - (mn_now - prev_mn_now);
2530 2530
2531 if (sleeptime > waittime - backend_fudge) 2531 if (sleeptime > waittime - backend_mintime)
2532 sleeptime = waittime - backend_fudge; 2532 sleeptime = waittime - backend_mintime;
2533 2533
2534 if (expect_true (sleeptime > 0.)) 2534 if (expect_true (sleeptime > 0.))
2535 { 2535 {
2536 ev_sleep (sleeptime); 2536 ev_sleep (sleeptime);
2537 waittime -= sleeptime; 2537 waittime -= sleeptime;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines