private Stopwatch StartCount()
{
Stopwatch s = new Stopwatch();
/// reset the clock
s.Reset();
/// start to count the time
s.Start();
/// return stopwatch for closing
return s;
}
private double StopCount(Stopwatch s)
{
/// stop to count the time
s.Stop();
/// return the total time passed in ms
return s.Elapsed.TotalMilliseconds;
}
--
參考資料
想計算程式執行時間,結果卻是?
沒有留言:
張貼留言