[Lldb-commits] [lldb] [lldb-dap] show a useful timestamp in log messages (PR #170737)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 5 03:13:43 PST 2025
================
@@ -20,10 +21,9 @@ namespace lldb_dap {
Log::Log(StringRef filename, std::error_code &EC) : m_stream(filename, EC) {}
void Log::WriteMessage(StringRef message) {
- std::lock_guard<std::mutex> lock(m_mutex);
- std::chrono::duration<double> now{
- std::chrono::system_clock::now().time_since_epoch()};
- m_stream << formatv("{0:f9} ", now.count()).str() << message << "\n";
+ const std::lock_guard<std::mutex> lock(m_mutex);
+ const llvm::sys::TimePoint<> time = std::chrono::system_clock::now();
----------------
felipepiovezan wrote:
Move-only types should probably never be const, otherwise they cannot be moved out of
https://github.com/llvm/llvm-project/pull/170737
More information about the lldb-commits
mailing list