Class StopwatchExtensions
Extension methods for System.Diagnostics.Stopwatch.
Since 2.0.x
Availability net45
Inheritance
Object
StopwatchExtensions
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.Extensions
Assembly: NodaTime.dll
Syntax
public static class StopwatchExtensions
Methods
ElapsedDuration(Stopwatch)
Returns the elapsed time of
stopwatch
as a Duration.
Since 2.0.x
Availability net45
Declaration
public static Duration ElapsedDuration(this Stopwatch stopwatch)
Parameters
Type | Name | Description |
---|---|---|
Stopwatch | stopwatch | The Stopwatch to obtain the elapsed time from. |
Returns
Type | Description |
---|---|
Duration | The elapsed time of stopwatch as a Duration . |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | stopwatch is null. |