System.Diagnostics.Stopwatch.Start Method

Starts, or resumes, measuring elapsed time for an interval.

Syntax

public void Start ()

Remarks

In a typical System.Diagnostics.Stopwatch scenario, you call the Stopwatch.Start method, then eventually call the Stopwatch.Stop method, and then you check elapsed time using the Stopwatch.Elapsed property.

Once started, a System.Diagnostics.Stopwatch timer measures the current interval, in elapsed timer ticks, until the instance is stopped or reset. Starting a System.Diagnostics.Stopwatch that is already running does not change the timer state or reset the elapsed time properties.

When a System.Diagnostics.Stopwatch instance measures more than one interval, the Stopwatch.Start method resumes measuring time from the current elapsed time value. A System.Diagnostics.Stopwatch instance calculates and retains the cumulative elapsed time across multiple time intervals, until the instance is reset. Use the Stopwatch.Reset method before calling Stopwatch.Start to clear the cumulative elapsed time in a System.Diagnostics.Stopwatch instance. Use the Stopwatch.Restart method to Stopwatch.Reset and Stopwatch.Start the System.Diagnostics.Stopwatch with a single command.

Requirements

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