[Lldb-commits] [lldb] [lldb] Add timed callbacks to the MainLoop class (PR #112895)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 6 11:42:09 PST 2024
================
@@ -38,6 +40,9 @@ class MainLoopBase {
class ReadHandle;
public:
+ using TimePoint = std::chrono::time_point<std::chrono::steady_clock,
----------------
labath wrote:
It's not likely to be useful, but we do have system APIs which provide nanosecond level resolution, so why not make it available. Users don't have to specify timeouts with a nanosecond level. They can just say `std::chrono::seconds/*or whatever*/(X)`, and it will be automatically to nanoseconds.
Using a lower precision would actually be somewhat unergonomic chrono conversions which lose precision are not implicit. So something like `steady_clock::now()+seconds(2)` would not be implicitly convertible to milliseconds if the clock resolution was more than milliseconds (which it usually is).
https://github.com/llvm/llvm-project/pull/112895
More information about the lldb-commits
mailing list