title: Using ctime to print current system time to millisecond precision?
body: <p>I have a data acquisition program running in an Ubuntu environment. When a data trigger is met, the program creates a new file containing the data, with the filename being a timestamp of when the trigger was met. Right now I'm generating a timestamp using ctime and the program works:</p>
  <pre><code>#include &lt;time.h&gt;
  
  time_t rawtime; // Generating time stamp
  time(&amp;rawtime);
  sprintf(buffer, &quot;/usb/%s.txt&quot;, ctime(&amp;rawtime));
  </code></pre>
  <p>A file is created named <code>Fri_May_27_17_58_38_2022.txt</code></p>
  <p>Is it possible to use the same method to get a more precise timestamp to milliseconds?</p>