title: How to print current time (with milliseconds) using C++ / C++11
body: <p>Currently I use this code</p>
  
  <pre><code>string now() {
      time_t t = time(0);
      char buffer[9] = {0};
  
      strftime(buffer, 9, "%H:%M:%S", localtime(&amp;t));
      return string(buffer);
  }
  </code></pre>
  
  <p>to format time. I need to add milliseconds, so the output has the format: <code>16:56:12.321</code></p>