统计方法执行时间

引用:using System.Diagnostics;

 

Stopwatch timer = Stopwatch.StartNew();

....(要计时的方法)

timer.Stop();
LogHelper.Info("此方法花费时间为:" + timer.Elapsed.TotalSeconds.ToString() + "秒");

posted on 2011-01-26 16:58  伊伦  阅读(302)  评论(0编辑  收藏  举报

导航