public static class SchedulerExtensions
Extension methods for IScheduler.
Namespace
Google.Api.GaxAssembly
Google.Api.Gax.dll
Methods
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).
Parameters | |
---|---|
Name | Description |
scheduler | IScheduler The scheduler to use for the sleep operation. |
delay | TimeSpan Time to sleep for. Must not be negative. |
cancellationToken | CancellationToken The cancellation token that will be watched during the sleep operation. |
Exceptions | |
---|---|
Type | Description |
OperationCanceledException | The cancellation token was cancelled during the sleep. |