Author: Pavel Labath Date: 2024-11-27T09:34:53Z New Revision: 17b87853c3b07b8e1c7f000c3818efab7fdd8883
URL: https://github.com/llvm/llvm-project/commit/17b87853c3b07b8e1c7f000c3818efab7fdd8883 DIFF: https://github.com/llvm/llvm-project/commit/17b87853c3b07b8e1c7f000c3818efab7fdd8883.diff LOG: [lldb] Fix premature MainLoop wakeup on windows (#117756) The windows system APIs only take milliseconds. Make sure we round the sleep interval (in nanoseconds) upwards. Added: Modified: lldb/source/Host/windows/MainLoopWindows.cpp Removed: ################################################################################ diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp index 0a5a35e9db9dde..f3ab2a710cd014 100644 --- a/lldb/source/Host/windows/MainLoopWindows.cpp +++ b/lldb/source/Host/windows/MainLoopWindows.cpp @@ -28,7 +28,7 @@ static DWORD ToTimeout(std::optional<MainLoopWindows::TimePoint> point) { return WSA_INFINITE; nanoseconds dur = (std::max)(*point - steady_clock::now(), nanoseconds(0)); - return duration_cast<milliseconds>(dur).count(); + return ceil<milliseconds>(dur).count(); } MainLoopWindows::MainLoopWindows() { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits