System.Diagnostics.Stopwatch.Reset Method

Stops time interval measurement and resets the elapsed time to zero.


public void Reset ()


A System.Diagnostics.Stopwatch instance calculates and retains the cumulative elapsed time across multiple time intervals, until the instance is reset. Use Stopwatch.Stop to stop the current interval measurement and retain the cumulative elapsed time value. Use Stopwatch.Reset to stop any interval measurement in progress and clear the elapsed time value.


Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0