computePollTimeout

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

Compute the effective poll timeout, clamped by the next timer deadline.

Parameters

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

Returns

Effective timeout, clamped to the next timer deadline or zeroed

when IDLE watchers are present.