I believe all Sync really does is.
Rendering and updating
Renders whats on the back buffer (what we code to in the main loop) and updates it to the front buffer (what we see on screen)
Not sure about any other mechanics or secrets behind the command
Others may know or be able to answer better
My advise, I would not use Sleep() - cause this will cause lags.
Instead I would use the timer() and set a variable and when a certain frame is passed - do something so that when the sync() comes along, it knows what to draw to the front buffer (screen)
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it