llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Pavel Labath (labath)

<details>
<summary>Changes</summary>

The windows system APIs only take milliseconds. Make sure we round the sleep 
interval (in nanoseconds) upwards.

---
Full diff: https://github.com/llvm/llvm-project/pull/117756.diff


1 Files Affected:

- (modified) lldb/source/Host/windows/MainLoopWindows.cpp (+1-1) 


``````````diff
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() {

``````````

</details>


https://github.com/llvm/llvm-project/pull/117756
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to