wallace requested changes to this revision.
wallace added inline comments.
This revision now requires changes to proceed.
================
Comment at: lldb/include/lldb/API/SBTraceCursor.h:175
+ /// if not available.
+ double GetWallClockTime() const;
+ /// \}
----------------
mention here that the trace plugin decides how to estimate wall clock time it
needed, and that not all trace items are guaranteed to have wall clock time, as
it depends on the trace plug-in capabilities
================
Comment at: lldb/source/API/SBTraceCursor.cpp:127-131
+double SBTraceCursor::GetWallClockTime() const {
+ LLDB_INSTRUMENT_VA(this);
+
+ const auto &maybe_wall_clock_time = m_opaque_sp->GetWallClockTime();
+ return maybe_wall_clock_time ? *maybe_wall_clock_time : -1.0;
----------------
we don't have optionals in the SB bridge, so you could do the following
bool SBTraceCursor::GetWallClockTime(double &time) {
if (const auto &maybe_wall_clock_time = m_opaque_sp->GetWallClockTime()) {
time = *maybe_wall_clock_time;
return true;
}
return false;
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137645/new/
https://reviews.llvm.org/D137645
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits