================
@@ -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();
----------------
JDevlieghere wrote:

I've never seen anyone define a lock_guard as const, so it look a bit weird in 
that context, but then on the other hand I see why you're making it consistent 
with the const below. I don't think there's a good solution so happy to go with 
your preference, and just wanted to call it out. 

https://github.com/llvm/llvm-project/pull/170737
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to