<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.hacks.be/wiki/index.php?action=history&amp;feed=atom&amp;title=Microsecond_time</id>
	<title>Microsecond time - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.hacks.be/wiki/index.php?action=history&amp;feed=atom&amp;title=Microsecond_time"/>
	<link rel="alternate" type="text/html" href="https://www.hacks.be/wiki/index.php?title=Microsecond_time&amp;action=history"/>
	<updated>2026-04-30T12:04:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://www.hacks.be/wiki/index.php?title=Microsecond_time&amp;diff=128&amp;oldid=prev</id>
		<title>Tom: Created page with &quot;I needed this one on Solaris to display microseconds (µseconds):  time_ms.c &lt;source lang=&quot;c&quot;&gt; #include &lt;sys/time.h&gt; main() {     struct timeval tv;     gettimeofday(&amp;tv, (voi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.hacks.be/wiki/index.php?title=Microsecond_time&amp;diff=128&amp;oldid=prev"/>
		<updated>2018-03-27T11:05:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;I needed this one on Solaris to display microseconds (µseconds):  time_ms.c &amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; #include &amp;lt;sys/time.h&amp;gt; main() {     struct timeval tv;     gettimeofday(&amp;amp;tv, (voi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I needed this one on Solaris to display microseconds (µseconds):&lt;br /&gt;
&lt;br /&gt;
time_ms.c&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/time.h&amp;gt;&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
    struct timeval tv;&lt;br /&gt;
    gettimeofday(&amp;amp;tv, (void*)0);&lt;br /&gt;
    // Print time with milliseconds and decimal separator&lt;br /&gt;
    // printf(&amp;quot;%d.%03d\n&amp;quot;, tv.tv_sec, tv.tv_usec/1000);&lt;br /&gt;
    // Print time with microseconds without decimal separator&lt;br /&gt;
    printf(&amp;quot;%d%06d\n&amp;quot;, tv.tv_sec, tv.tv_usec);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
gcc time_ms.c -o time_ms&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Credits: https://superuser.com/questions/178330/milliseconds-from-solaris-command-line&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
</feed>