diff options
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index 80cf6f100..4451fd302 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -58,13 +58,15 @@ Event::Reset() bool Event::Wait(int TimeoutMs) { + using namespace std::literals; + const DWORD Timeout = (TimeoutMs < 0) ? INFINITE : TimeoutMs; DWORD Result = WaitForSingleObject(m_EventHandle, Timeout); if (Result == WAIT_FAILED) { - throw WindowsException("Event wait failed"); + zen::ThrowLastError("Event wait failed"sv); } return (Result == WAIT_OBJECT_0); |