GetRawElapsedTicks Method
Collapse the table of content
Expand the table of content

Stopwatch.GetRawElapsedTicks Method

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

Gets the total elapsed time measured by the current instance, in timer ticks.

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

public long GetRawElapsedTicks()

Return Value

Type: System.Int64
Returns Int64.

This property represents the number of elapsed ticks in the underlying timer mechanism. A tick is the smallest unit of time that the Stopwatch timer can measure. Use the Frequency field to convert the ElapsedTicks value into a number of seconds.

You can query the properties Elapsed, ElapsedMilliseconds, and ElapsedTicks while the Stopwatch instance is running or stopped. The elapsed time properties steadily increase while the Stopwatch is running; they remain constant when the instance is stopped.

By default, the elapsed time value of a Stopwatch instance equals the total of all measured time intervals. Each call to Start() begins counting at the cumulative elapsed time; each call to Stop() ends the current interval measurement and freezes the cumulative elapsed time value. Use the Reset() method to clear the cumulative elapsed time in an existing Stopwatch instance.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft