using System.Diagnostics;
            
Stopwatch watch = new Stopwatch();
watch.Start();
/*
需要测量运行时间的程序
*/
watch.Stop();
this.BeginInvoke(updateTxt, " (耗时" + (watch.ElapsedMilliseconds / 1000.0) + " s)\r\n", Color.Red); 

 

相关文章:

  • 2021-06-11
  • 2021-09-05
  • 2021-05-18
  • 2021-08-21
  • 2021-08-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2021-07-04
  • 2021-12-14
  • 2022-02-07
  • 2022-12-23
  • 2021-08-03
相关资源
相似解决方案