nativeEvents, or -1 with error set.Wait for native events.
This method uses a hybrid approach:
nativeEvents | Caller-provided output buffer for native events. |
timeoutMs | Wait timeout in milliseconds. -1 means infinite. |
nativeEvents, or -1 with error set.