WaitForSingleObject function kernel32
Waits until the specified object is in the signaled state or the time-out interval elapses.
To learn more, see learn.microsoft.com/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject.
Implementation
Win32Result<WAIT_EVENT> WaitForSingleObject(
HANDLE hHandle,
int dwMilliseconds,
) {
final result_ = WaitForSingleObject_Wrapper(hHandle, dwMilliseconds);
return .new(value: .new(result_.value.u32), error: result_.error);
}