Stopwatch.Reset 方法

定义

停止时间间隔测量,并将运行时间重置为零。Stops time interval measurement and resets the elapsed time to zero.

public:
 void Reset();
public void Reset ();
member this.Reset : unit -> unit
Public Sub Reset ()

注解

Stopwatch实例计算并保留多个时间间隔内的累计运行时间, 直到重置实例。A Stopwatch instance calculates and retains the cumulative elapsed time across multiple time intervals, until the instance is reset. 使用Stop可停止当前间隔度量并保留累计运行时间值。Use Stop to stop the current interval measurement and retain the cumulative elapsed time value. 使用Reset可停止正在进行的任何间隔测量, 并清除已用时间值。Use Reset to stop any interval measurement in progress and clear the elapsed time value.

适用于

另请参阅