TimerState.computePollTimeout
int computePollTimeout(Slot)(int requestedTimeoutMs,
const ref TimerWheel timerWheel,
scope const(Slot)[] slots) const pure @safe nothrow @nogcCompute the poll timeout considering timer deadlines and idle watchers.
Returns the most restrictive timeout between the requested timeout, the next timer deadline, and the presence of idle watchers.
Parameters
requestedTimeoutMs | Caller-requested timeout in milliseconds. |
timerWheel | Timer wheel to check for next deadline. |
slots | Watcher slot array to check for idle watchers. |
Returns
The adjusted timeout in milliseconds, or 0 if idle watchers exist.