Wow, I never thought someone would use my function
I know this sounds strange, but I advise you not to use it, because there are much easier ways to do this, and my function can be a little strange sometimes. One method being Pincho's example above (extended version):
rem variables
global fps as integer = 60
global GameTimer as dword
global GameSpeed as integer = 1000/fps
rem main loop
do
rem check if it's time to do something
if GameTimer<timer()
rem your game code here
rem refresh screen
sync
rem update game timer
GameTime=timer()+GameSpeed
endif
rem end of main loop
loop
Thanks for using my code though, I appreciate it
TheComet