Why doesn't vsync() seem to work?

Description

Why doesn't vsync() seem to work?
A number of graphics cards have buggy or incomplete VESA implementations, and often the vsync() function is not implemented. For examples on flicker-free drawing, look at the code for the demo game, which uses a variety of methods to draw itself.