Here's a simple example:
Const FPS=30 Global framePeriod = 1000/FPS frametimer = CreateTimer(framePeriod) While Not Keyhit(1) UpdateWorld() RenderWorld() WaitTimer frametimer ProjectUpdate() Flip Wend End