This documentation is archived and is not being maintained.

Stopwatch.Start Method

Note: This method is new in the .NET Framework version 2.0.

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

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

Public Sub Start
Dim instance As Stopwatch

public void Start ()
public function Start ()

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

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

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

The following example uses the Stopwatch class to implement start, stop, reset, and lap-time buttons in a Windows form application. This code example is part of a larger example provided for the Stopwatch class.

If stopWatch.IsRunning Then

    ' Stop the timer; show the start and reset buttons.
    buttonStartStop.Text = "Start"
    buttonLapReset.Text = "Reset"
    ' Start the timer; show the stop and lap buttons.
    buttonStartStop.Text = "Stop"
    buttonLapReset.Text = "Lap"
    labelLap.Visible = False
    labelLapPrompt.Visible = False
End If

if (stopWatch.get_IsRunning()) {
    // Stop the timer; show the start and reset buttons.
else {
    // Start the timer; show the stop and lap buttons.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0