When you do the project, you need to output the database operation time-consuming, wrote a method. When the boss saw it, I wondered why I didn't have to. Only to know that there are stopwatch this class.
Properties
|
name |
description |
|
Elapsed |
Gets the total elapsed time measured by the current instance. |
|
Elapsedmilliseconds |
Gets the total elapsed time, in milliseconds, measured by the current instance. |
|
Elapsedticks |
Gets the total elapsed time measured by the current instance, expressed in a timer scale. |
|
IsRunning |
Gets a value that indicates whether the Stopwatch timer is running. |
Method
|
name |
description |
|
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherit from Object.) ) |
|
Finalize() |
Allows the object to attempt to free resources and perform other cleanup operations before garbage collection reclaims an object. (Inherit from Object.) ) |
|
GetHashCode() |
As the default hash function. (Inherit from Object.) ) |
|
Gettimestamp() |
Gets the current number of ticks in the timer mechanism. |
|
GetType() |
Gets the Type of the current instance. (Inherit from Object.) ) |
|
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherit from Object.) ) |
|
Reset() |
Stops the interval measurement and resets the run time to zero. |
|
Restart() |
Stop the interval measurement, reset the run time to zero, and start measuring elapsed time. |
|
Start() |
Start or continue measuring the elapsed time of an interval. |
|
StartNew() |
Initializes a new Stopwatch instance, sets the run time property to zero, and then starts measuring elapsed time. |
|
Stop() |
Stops measuring the elapsed time of an interval. |
|
ToString() |
Returns a String that represents the current object. (Inherit from Object.) ) |
Use of C # stopwatch