Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Stopwatch wrapper
private T with_timer<T>(Func<T> action)
{
Stopwatch sw = Stopwatch.StartNew();
var result = action();
sw.Stop();
TimeSpan time = sw.Elapsed;
System.Console.WriteLine("Time: {0:00}:{1:00}:{2:00}.{3:000}", time.Hours, time.Minutes, time.Seconds, time.Milliseconds);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.