Class SystemScheduler (4.0.0)

Stay organized with collections Save and categorize content based on your preferences.
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