Class SystemScheduler (4.4.0)

public sealed class SystemScheduler : IScheduler

Singleton implementation of IScheduler which uses Delay(TimeSpan, CancellationToken).

Inheritance

object > SystemScheduler

Implements

IScheduler

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Properties

Instance

public static SystemScheduler Instance { get; }

Retrieves the singleton instance.

Property Value
TypeDescription
SystemScheduler

Methods

Delay(TimeSpan, CancellationToken)

public Task Delay(TimeSpan timeSpan, CancellationToken cancellationToken)

Returns a task which will complete after the given delay. Whether the returned awaitable is configured to capture the current context or not is implementation-specific. (A test implementation may capture the current context to enable reliable testing.)

Parameters
NameDescription
timeSpanTimeSpan
cancellationTokenCancellationToken

The cancellation token that will be checked prior to completing the returned task.

Returns
TypeDescription
Task

A task which will complete after the given delay.

Extension Method