Stopwatch.GetTimestamp Method ()

 

Gets the current number of ticks in the timer mechanism.

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

static member GetTimestamp : unit -> int64

Return Value

Type: System.Int64

A long integer representing the tick counter value of the underlying timer mechanism.

If the Stopwatch class uses a high-resolution performance counter, GetTimestamp returns the current value of that counter. If the Stopwatch class uses the system timer, GetTimestamp returns the current DateTime.Ticks property of the DateTime.Now instance.

The following example illustrates the use of the GetTimestamp method to update a performance counter.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: