WaitForNextSampleClock(double)
- Updated2026-02-03
- 1 minute(s) read
Waits until the next pulse of the sample clock occurs.
Syntax
Namespace: NationalInstruments.DAQmx
public bool WaitForNextSampleClock(double timeout)
Remarks
If an extra sample clock pulse occurs between calls to this method, the second call returns an error or warning and waits for the next sample clock pulse. Use the ConvertLateErrorsToWarnings property to specify whether this method returns errors or warnings.
Use this method to ensure I/O cycles complete within sample clock periods. National Instruments recommends you use this method for certain applications only.
Parameters
| Name | Type | Description |
|---|---|---|
| timeout | double | The maximum amount of time, in seconds, to wait for the next sample clock pulse. If the time elapses, this method returns an error. If you set timeout to -1, this method waits indefinitely. |
Returns
Specifies whether the next sample clock is late.
Exceptions
| Type | Description |
|---|---|
| NationalInstruments.DAQmx.DaqException | The NI-DAQmx driver returned an error. |