Add a format_provider for the Timeout class

and use it in the appropriate log statements.

Formatting of chrono types in log messages was very clunky. This should
make it much nicer to use and give better output. For details of the
formatting options see the chrono formatter in llvm.

llvm-svn: 294738
diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp
index a631a5e..2f4aa9f 100644
--- a/lldb/source/Core/Communication.cpp
+++ b/lldb/source/Core/Communication.cpp
@@ -115,12 +115,11 @@
 size_t Communication::Read(void *dst, size_t dst_len,
                            const Timeout<std::micro> &timeout,
                            ConnectionStatus &status, Error *error_ptr) {
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_COMMUNICATION,
-      "%p Communication::Read (dst = %p, dst_len = %" PRIu64
-      ", timeout = %u usec) connection = %p",
-      this, dst, (uint64_t)dst_len, timeout ? timeout->count() : -1,
-      m_connection_sp.get());
+  Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION);
+  LLDB_LOG(
+      log,
+      "this = {0}, dst = {1}, dst_len = {2}, timeout = {3}, connection = {4}",
+      this, dst, dst_len, timeout, m_connection_sp.get());
 
   if (m_read_thread_enabled) {
     // We have a dedicated read thread that is getting data for us