Delay(TimeSpan, CancellationToken)
abstract
public abstract Task<bool> Delay(TimeSpan timeSpan, CancellationToken cancellationToken = default(CancellationToken)) Returns a task which will complete when the specified timespan elapses or the provided cancellation token is canceled.
Parameters
timeSpanTimeSpan- The time span.
cancellationTokenCancellationToken- The cancellation token.
Returns
true if the timer ran to completion; otherwise false.