Table of Contents

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

delay TimeSpan

Time span to wait, or InfiniteTimeSpan to wait indefinitely.

cancellationToken CancellationToken

Cancellation token that allows the caller to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

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.