… | |
… | |
4092 | |
4092 | |
4093 | if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) |
4093 | if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) |
4094 | { |
4094 | { |
4095 | waittime = EV_TS_CONST (MAX_BLOCKTIME); |
4095 | waittime = EV_TS_CONST (MAX_BLOCKTIME); |
4096 | |
4096 | |
|
|
4097 | #if EV_USE_MONOTONIC |
4097 | if (ecb_expect_true (have_monotonic)) |
4098 | if (ecb_expect_true (have_monotonic)) |
4098 | { |
4099 | { |
4099 | #if EV_USE_TIMERFD |
4100 | #if EV_USE_TIMERFD |
4100 | /* sleep a lot longer when we can reliably detect timejumps */ |
4101 | /* sleep a lot longer when we can reliably detect timejumps */ |
4101 | if (ecb_expect_true (timerfd != -1)) |
4102 | if (ecb_expect_true (timerfd != -1)) |
… | |
… | |
4105 | /* without periodics but with monotonic clock there is no need */ |
4106 | /* without periodics but with monotonic clock there is no need */ |
4106 | /* for any time jump detection, so sleep longer */ |
4107 | /* for any time jump detection, so sleep longer */ |
4107 | waittime = EV_TS_CONST (MAX_BLOCKTIME2); |
4108 | waittime = EV_TS_CONST (MAX_BLOCKTIME2); |
4108 | #endif |
4109 | #endif |
4109 | } |
4110 | } |
|
|
4111 | #endif |
4110 | |
4112 | |
4111 | if (timercnt) |
4113 | if (timercnt) |
4112 | { |
4114 | { |
4113 | ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; |
4115 | ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; |
4114 | if (waittime > to) waittime = to; |
4116 | if (waittime > to) waittime = to; |