SyncWait
- Updated2023-02-21
- 1 minute(s) read
SyncWait
void SyncWait (double beginTime, double interval);
Purpose
Waits until interval seconds elapse since beginTime.
You can use SyncWait to implement a timed loop. In the following code, SyncWait ensures that each iteration of the loop takes at least three seconds:
int i;
double mark, interval;
for (i=0; i < 10; i++) {
mark = Timer();
interval = 3.0;
SyncWait (mark, interval);}
The resolution is normally 1 millisecond. However, if you set the useDefaultTimer configuration option to True, the resolution is 55 milliseconds.
(Linux) The resolution is 1 millisecond.
Parameters
Input | ||
Name | Type | Description |
beginTime | double | The point in time from which interval is measured. beginTime must be a value that Timer returns. |
interval | double | Number of seconds to wait after beginTime. |
Return Value
None.
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to analysis\pulse.cws for an example of using the SyncWait function.