Task.WaitUntilDone Method (TimeSpan)
- Updated2023-02-21
- 1 minute(s) read
TaskWaitUntilDone Method (TimeSpan)
Waits for the measurement or generation to complete and returns if it has completed execution before the specified TimeSpan elapses.
Namespace: NationalInstruments.DAQmx
Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302
Syntax
public void WaitUntilDone( TimeSpan timeout )
Public Sub WaitUntilDone ( timeout As TimeSpan )
Parameters
- timeout
- Type: SystemTimeSpan
The maximum TimeSpan to wait for the measurement or generation to complete. This method returns an error if the time elapses.
Return Value
Type:if the task has completed execution.
Exceptions
Exception | Condition |
---|---|
DaqException | The NI-DAQmx driver returned an error. |
Remarks
WaitUntilDone(TimeSpan) waits for the task to finish acquiring or generating the number of samples per channel specified on the Timing class. WaitUntilDone(TimeSpan) does not wait for pending asynchronous operations to complete. Use the methods and properties on the IAsyncResult to verify that asynchronous reads and writes are complete.