Is there an equivalent of "gettimeofday" in .NET
<p>I am working with .NET but I need to communicate with a logging service, unix based, that expects seconds and microseconds since the Unix epoch time.  The seconds is easily retrievable doing something like:</p>

<pre><code>DateTime UnixEpoch = new DateTime(1970, 1, 1);
TimeSpan time = DateTime.UtcNow() - UnixEpoch
int seconds = (int) time.TotalSeconds
</code></pre>

<p>however, I am unsure how to calculate the microseconds.  I could use the TotalMilliseconds property and convert it to microseconds but I believe that defeats the purpose of using microseconds as a precise measurement.  I have looked into using the StopWatch class but it doesn't seem like I can seed it with a time (Unix Epoch for example).</p>

<p>Thanks.</p>
