Stop Method
Collapse the table of content
Expand the table of content

Stopwatch.Stop Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Stops measuring elapsed time for an interval.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public void Stop()

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

The Stop method ends the current time interval measurement. Stopping a Stopwatch that is not running does not change the timer state or reset the elapsed time properties.

When a Stopwatch instance measures more than one interval, the Stop method is equivalent to pausing the elapsed time measurement. A subsequent call to Start resumes measuring time from the current elapsed time value. Use the Reset() method to clear the cumulative elapsed time in a Stopwatch instance.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft