public static class SchedulerExtensionsExtension 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 | ISchedulerThe scheduler to use for the sleep operation. | 
| delay | TimeSpanTime to sleep for. Must not be negative. | 
| cancellationToken | CancellationTokenThe cancellation token that will be watched during the sleep operation. | 
| Exceptions | |
|---|---|
| Type | Description | 
| OperationCanceledException | The cancellation token was cancelled during the sleep. |