Method Delay
Delay(TimeSpan, CancellationToken)
Creates a delay. In tests, this can be instant or controlled.
Task Delay(TimeSpan duration, CancellationToken cancellationToken = default)
Parameters
durationTimeSpanThe time span to delay.
cancellationTokenCancellationTokenCancellation token for the delay.
Returns
- Task
A task that completes after the delay.