可能重复: 如何测量函数运行的时间?
我有一个I/O计时方法,可以将数据从一个位置复制到另一个位置.什么是计算执行时间的最佳和最实际的方法?Thread?Timer?Stopwatch?还有其他方法吗?我想要最精确的一个,尽可能简短.
Thread
Timer
Stopwatch
.net c# io timer stopwatch
.net ×1
c# ×1
io ×1
stopwatch ×1
timer ×1