赞
踩
1. 创建Stopwatch对象:Stopwatch stopWatch = new Stopwatch();
2. 开始计时:stopWatch.Start();
3. 停止计时:stopWatch.Stop();
4. 获取结果:TimeSpan timeSpan=stopwatch.Elapsed;