What\'s the best way to sleep a certain amount of time, but be able to be interrupted by a IsCancellationRequested from a CancellationToken?
IsCancellationRequested
CancellationToken
Alternatively, I think this is pretty clear:
Task.Delay(waitTimeInMs, cancellationToken).Wait(cancellationToken);