Stopwatch进行程式性能监测
Stopwatch类的命名空间:using System.Diagnostics;
用法:
Stopwatch sw = new Stopwatch();
sw.Start();
//////////////////////////////////
需要监测的代码
/////////////////////////////////
sw.Stop();
TimeSpan ts2 = sw.Elapsed;
ShowExclamation("执行时间" + ts2.TotalMilliseconds);//此处ShowExclamation方法是show包装后。

浙公网安备 33010602011771号