Interface IStopwatch
Interface for stopwatches.
Namespace: System.Time
Assembly: Nuqleon.Time.dll
Syntax
public interface IStopwatch
Properties
Elapsed
Gets the total elapsed time measured by the current instance.
Declaration
TimeSpan Elapsed { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
ElapsedMilliseconds
Gets the total elapsed time measured by the current instance, in milliseconds.
Declaration
long ElapsedMilliseconds { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
ElapsedTicks
Gets the total elapsed time measured by the current instance, in timer ticks.
Declaration
long ElapsedTicks { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
IsRunning
Gets a value indicating whether the stopwatch timer is running.
Declaration
bool IsRunning { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetTimestamp()
Gets the current number of ticks in the timer mechanism.
Declaration
long GetTimestamp()
Returns
Type | Description |
---|---|
System.Int64 | A long integer representing the tick counter value of the underlying timer mechanism. |
Reset()
Stops time interval measurement and resets the elapsed time to zero.
Declaration
void Reset()
Restart()
Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
Declaration
void Restart()
Start()
Starts, or resumes, measuring elapsed time for an interval.
Declaration
void Start()
Stop()
Stops measuring elapsed time for an interval.
Declaration
void Stop()