It seems there is an error in the C code on page 195.
Actually it is:
if (frameCounter < vsyncCounter) continue;
It should be:
if (frameCounter >= vsyncCounter) continue;
Reasoning:
While (frameCounter >= vsyncCounter) the main flow actively waits.
It executes one step when the interrupt increments vsyncCounter, that is when frameCounter becomes < vsyncCounter.
It seems there is an error in the C code on page 195.
Actually it is:
if (frameCounter < vsyncCounter) continue;
It should be:
if (frameCounter >= vsyncCounter) continue;
Reasoning: While (frameCounter >= vsyncCounter) the main flow actively waits. It executes one step when the interrupt increments vsyncCounter, that is when frameCounter becomes < vsyncCounter.