WaitUntilDone(int)
- Updated2026-02-03
- 1 minute(s) read
Waits for the measurement or generation to complete and returns if it has completed execution before the specified time elapses.
Syntax
Namespace: NationalInstruments.DAQmx
public void WaitUntilDone(int millisecToWait)
Remarks
WaitUntilDone(int) waits for the task to finish acquiring or generating the number of samples per channel specified on the Timing class. WaitUntilDone(int) 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.
Parameters
| Name | Type | Description |
|---|---|---|
| millisecToWait | int | The maximum amount of time in milliseconds to wait for the measurement or generation to complete. This method returns an error if the time elapses. If you set the timeout to -1, the method always waits for the task to complete, regardless of the amount of time needed. |
Returns
true if the task has completed execution.
Exceptions
| Type | Description |
|---|---|
| NationalInstruments.DAQmx.DaqException | The NI-DAQmx driver returned an error. |