Method DelayAsync
- Namespace
- WhalesSecret.TradeScriptLib.API.TradingV1
- Assembly
- WhalesSecret.TradeScriptLib.dll
DelayAsync(TimeSpan, CancellationToken)
Waits the specified time interval in the backtesting simulation.
Task DelayAsync(TimeSpan delay, CancellationToken cancellationToken)
Parameters
delayTimeSpanTime span to wait, or InfiniteTimeSpan to wait indefinitely.
cancellationTokenCancellationTokenCancellation token that allows the caller to cancel the operation.
Returns
Remarks
If the delay is completed successfully, the caller must call NotifyDelayProcessingCompleted() after it has finished processing of all operations related to the delay call.
Exceptions
- OperationCanceledException
Thrown if the operation was cancelled, including cancellation during the shutdown.