class Stopwatch

in global :: System . Diagnostics

Provides a set of methods and properties that you can use to accurately measure elapsed time.


public TimeSpan Elapsed { get; }

Gets the total elapsed time measured by the current instance.

  • Returns A read-only representing the total elapsed time measured by the current instance.

public long ElapsedMilliseconds { get; }

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

  • Returns A read-only long integer representing the total number of milliseconds measured by the current instance.

public long ElapsedTicks { get; }

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

  • Returns A read-only long integer representing the total number of timer ticks measured by the current instance.

public static long Frequency

Gets the frequency of the timer as the number of ticks per second. This field is read-only.

public static bool IsHighResolution

Indicates whether the timer is based on a high-resolution performance counter. This field is read-only.

public bool IsRunning { get; }

Gets a value indicating whether the timer is running.

  • Returns if the instance is currently running and measuring elapsed time for an interval; otherwise, .

public string ToString( )

😔 No documentation found.

public void Reset( )

😔 No documentation found.

public void Stop( )

😔 No documentation found.

public static Stopwatch StartNew( )

😔 No documentation found.

public static long GetTimestamp( )

😔 No documentation found.

public static TimeSpan GetElapsedTime( long startingTimestamp )

😔 No documentation found.

public static TimeSpan GetElapsedTime( long startingTimestamp, long endingTimestamp )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public Stopwatch( )

😔 No documentation found.

public void Restart( )

😔 No documentation found.

public void Start( )

😔 No documentation found.