home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGC.ZIP
/
PROGC007.C
< prev
next >
Wrap
Text File
|
1988-04-10
|
817b
|
21 lines
/************************************************************************/
/* Wait for start of next vertical retrace */
/************************************************************************/
wait_4_vert()
{
int i;
long int count, ticks();
printf("\n...counting");
count = ticks(); /* Get current tick */
for (i = 0; i < 300; i++)
vertical_retrace(); /* Wait for start of */
/* next vertical retrace*/
count = ticks() - count;
printf("\n300 vertical retraces took %ld ticks",count);
printf("\nThat is %d cycle refresh rate",
(300 * (long)91)/(5 * count));
}