OsPoller.wait

int wait(scope NativeEvent[] nativeEvents, int timeoutMs) @trusted nothrow @nogc

Wait for native events from the active backend.

Parameters

nativeEventsCaller-provided output buffer for native events.
timeoutMsWait timeout in milliseconds. -1 means infinite.

Returns

Number of events written to nativeEvents, or -1 with errno set.