C#_技巧:计算代码块运行的时间

System.Diagnostics下类Stopwatch,给程序代码块运行计时,

利用start()和stop()方法来标记代码快。

该命名空间下还有一些其他类,可以对程序进行诊断(diagnosis)。

 

posted @ 2016-05-27 18:25  shinchan  阅读(296)  评论(0编辑  收藏  举报