gigatron/rom/Archive/lcc/Libs/Gigatron/BusyWait.c
2025-01-28 19:17:01 +03:00

18 lines
334 B
C

#include <Gigatron.h>
/*
* Spin for `frames` vertical blanks of the Gigatron VGA signal (59.98 Hz)
* Good for waits of up to 9 minutes. Negative delays return immediately.
*/
void BusyWait(int frames)
{
byte nextFrame = frameCount;
while (frames-- > 0) {
nextFrame++;
while (frameCount != nextFrame)
;
}
}