void SyncWait (double beginTime, double interval);
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.
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. |
None.