computePollTimeout

fnint computePollTimeout(ref const EventLoop loop, int timeoutMs) pure @safe nothrow @nogc

Compute the effective poll timeout.

Timers are kernel-managed via EVFILT_TIMER, so the timeout only needs to respect the caller's requested timeout and IDLE watchers.

Parameters

loopHost event loop.
timeoutMsRequested timeout in milliseconds, -1 for infinite.

Returns

Effective timeout, zeroed when IDLE watchers are present.