Scheduler.StartStopwatch(IScheduler) method¶
Defined in
Type: Scheduler
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static IStopwatch StartStopwatch(this IScheduler scheduler)
Summary: Starts a new stopwatch object by dynamically discovering the scheduler's capabilities. If the scheduler provides stopwatch functionality, the request will be forwarded to the stopwatch provider implementation. Otherwise, the stopwatch will be emulated using the scheduler's notion of absolute time.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to obtain a stopwatch for. |
Returns: IStopwatch -- New stopwatch object; started at the time of the request.
Remarks
The resulting stopwatch object can have non-monotonic behavior.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler is null. |