Class StopwatchExtensions
Extension methods for Stopwatch.
Since 2.0.x
Availability net6.0, net8.0, netstandard2.0
Inherited Members
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 net6.0, net8.0, netstandard2.0
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 . |