diff options
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index 0a6af0406..fc7efa2fc 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -373,8 +373,8 @@ NamedEvent::Wait(int TimeoutMs) } struct timeval TimeoutValue = { - .tv_sec = 0, - .tv_usec = TimeoutMs << 10, + .tv_sec = (TimeoutMs >> 10), + .tv_usec = (TimeoutMs & 0x3ff) << 10, }; struct timeval* TimeoutPtr = (TimeoutMs < 0) ? nullptr : &TimeoutValue; |