Skip to content

Instantly share code, notes, and snippets.

@devlights
Created March 23, 2014 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devlights/9720622 to your computer and use it in GitHub Desktop.
Save devlights/9720622 to your computer and use it in GitHub Desktop.
Stopwatchでマイクロ秒を算出 (Microseconds, Frequency)
using System;
using System.Diagnostics;
namespace System.Diagnostics.Extensions
{
public static class StopwatchExtensions
{
public static long ElapsedMicroseconds(this Stopwatch self)
{
return (self.ElapsedTicks * (1000 * 1000) / Stopwatch.Frequency);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment