public static class SchedulerExtensions
Extension methods for IScheduler.
InheritanceObject > SchedulerExtensions
Sleep(IScheduler, TimeSpan, CancellationToken)
public static void Sleep(this IScheduler scheduler, TimeSpan delay, CancellationToken cancellationToken)
Simulates a synchronous delay by calling Delay(TimeSpan, CancellationToken) on
scheduler, and unwrapping any exceptions generated (typically cancellation).
The scheduler to use for the sleep operation.
Time to sleep for. Must not be negative.
The cancellation token that will be watched during the sleep operation.
The cancellation token was cancelled during the sleep.