System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start(); //开始监视代码运行时间 //测试代码 stopwatch.Stop(); /停止监视double seconds = timespan.TotalSeconds; //总秒数本文共 245 字,大约阅读时间需要 1 分钟。
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start(); //开始监视代码运行时间 //测试代码 stopwatch.Stop(); /停止监视double seconds = timespan.TotalSeconds; //总秒数转载于:https://www.cnblogs.com/LD1018/p/7943187.html