Export (0) Print
Expand All

Stopwatch Members

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

The following tables list the members exposed by the Stopwatch type.

  Name Description
Public method Stopwatch Initializes a new instance of the Stopwatch class.
Top

  Name Description
Public field Static Frequency Gets the frequency of the timer as the number of ticks per second. This field is read-only.
Public field Static IsHighResolution Indicates whether the timer is based on a high-resolution performance counter. This field is read-only.
Top

  Name Description
Public property Elapsed Gets the total elapsed time measured by the current instance.
Public property ElapsedMilliseconds Gets the total elapsed time measured by the current instance, in milliseconds.
Public property ElapsedTicks Gets the total elapsed time measured by the current instance, in timer ticks.
Public property IsRunning Gets a value indicating whether the Stopwatch timer is running.
Top

(see also Protected Methods )
  Name Description
Public method Equals  Overloaded. Determines whether two Object instances are equal. (Inherited from Object.)
Public method GetHashCode  Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.)
Public method Static GetTimestamp Gets the current number of ticks in the timer mechanism.
Public method GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method Reset Stops time interval measurement and resets the elapsed time to zero.
Public method Start Starts, or resumes, measuring elapsed time for an interval.
Public method Static StartNew Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time.
Public method Stop Stops measuring elapsed time for an interval.
Public method ToString  Returns a String that represents the current Object. (Inherited from Object.)
Top

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)
Top

Community Additions

ADD
Show:
© 2014 Microsoft