Stopwatch定时器测量代码中不同任务执行时间

时间:2021-02-17 14:21:57   收藏:0   阅读:0
 Stopwatch sw = new Stopwatch();
  sw.Start();
  //任务123
  Console.WriteLine("{0, 4}ms",sw.Elapsed.TotalMilliseconds);

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!