StopWatch Class

Used to measure elapsed time, with up to millisecond accuracy. A Stopwatch instance can measure elapsed time for one interval (between two specific points in time), or the total of elapsed time across multiple intervals

By default, the elapsed time value of a Stopwatch instance equals the total of all measured time intervals. Each call to Start begins counting at the cumulative elapsed time; each call to Stop ends the current interval measurement and freezes the cumulative elapsed time value. Use the Reset method to clear the cumulative elapsed time in an existing Stopwatch instance.

Namespace: elsystem

Properties
  Name Type Description
Public property Elapsed object Gets the elapsed TimeSpan values.
Public property ElapsedMilliseconds int64 Gets the elapsed time in milliseconds.
Public property ElapsedTicks int64 Gets the elapsed time in timer ticks.
Public property Frequency int64 Gets the number of ticks per second.
Public property IsHighResolution bool True if the StopWatch timer is set to high resolution.
Public property IsRunning bool True if the StopWatch timer is running.
Methods
  Name Description
Public property Create Initializes a new instance of the class.
Public property Reset Sets the elapsed time to zero and stops the timer.
Public property Restart Sets the elapsed time to zero and begins measuring elapsed time.
Public property Start Starts measuring elapsed time.
Public property StartNew Initializes a new instance of the class and begins measuring elapsed time.
Public property Stop Stops measuring elapsed time.