Stopwatch Class |
Namespace: System.Diagnostics
public class Stopwatch
The Stopwatch type exposes the following members.
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Reset |
Stops time interval measurement and resets the elapsed time to zero.
| |
Restart |
Stops time interval measurement, resets the elapsed time to zero, and starts
measuring elapsed time.
| |
Start |
Starts, or resumes, measuring elapsed time for an interval.
| |
StartNew | Initializes a new Stopwatch instance, sets the elapsed time property to zero, and starts measuring elapsed time. | |
Stop |
Stops measuring elapsed time for an interval.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Elapsed |
A read-only System.TimeSpan representing the total elapsed time measured
by the current instance.
| |
ElapsedMilliseconds |
Gets the total elapsed time measured by the current instance, in milliseconds.
| |
ElapsedTicks |
Gets the total elapsed time measured by the current instance, in timer ticks.
| |
IsRunning |
Gets a value indicating whether the System.Diagnostics.Stopwatch timer is
running.
|