System.Diagnostics.Stopwatch.GetTimestamp Method

Gets the current number of ticks in the timer mechanism.

Syntax

public static long GetTimestamp ()

Returns

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

Remarks

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

Requirements

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