printf (“Block measurement: %d samples/s\n”, 10000 * 1000 /
(Stop - Start));
do {
ibwrite(counter, “syst:err?”);
ibrd(counter, buf, 100L); buf[ibcnt]=0;
printf(“End error: %s\n”, buf);
} while (atoi(buf)!=0);
ibonl(counter, 0);
}
/********************
* Support functions *
********************/
void ibwrite(int counter, const char *string) {
ibwrt(counter, (char*) string, strlen(string));
}
void sleep (long mswait) {
time_t EndWait = clock() + mswait *
(CLOCKS_PER_SEC/1000);
while (clock() < EndWait);
}
Programming Examples
Block Measurements (Ex. #2) 4-7