Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

SyncWait

LabWindows/CVI 8.5 Help
November 2007

NI Part Number:
370051K-01

»View Product Info

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-precision The point in time from which interval is measured. beginTime must be a value that Timer returns.
interval double-precision Number of seconds to wait after beginTime.

Return Value

None.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit