标签:
using System.Diagnostics; Stopwatch watch = new Stopwatch(); watch.Start(); //--------功能代码 watch.Stop(); LogUtil.WriteLog(new Exception("处理时间:" +watch.ElapsedMilliseconds.ToString()));
C#中测试某段功能耗时
原文地址:http://www.cnblogs.com/nightsnow/p/4691612.html