Stopwatchのライブラリ。処理の計測などに使えます。すまーと。
http://okazuki.hatenablog.com/entry/20091217/1261056768
Watch.Action(() => {
System.Threading.Thread.Sleep(3000);
});
// かかった時間: 2999ms
public static class Watch
{
public static void Action(Action action)
{
var watch = System.Diagnostics.Stopwatch.StartNew();
action();
Console.WriteLine("かかった時間: {0}ms", watch.ElapsedMilliseconds);
}
}