I have a better suggestion...
Do what I do.
PS:
Hasfocus() is a function available in the code archives.
This code allows you to specify a maximum framerate at which your game runs, and any extra time at the end of each frame is returned to windows. Since your screen can only flip between 60 to 85 times a second depending on your frefresh rate, you can set this value to 80 and still get back time. Also note that even a delay of 0 gives windows focus for a little while as far as I know.
This code also handles alt tabbing out of the app greacefully, and switching to another app normally when in windowed mode. It detects if the app has focus, and if not, it runs in a loop with a delay(100) waiting for focus to return. It then resets the timers so that the game is none the wiser that it has been paused.
This code also allows one o slow down time merely by dividing the Time_Delta_Sec# value by some amount. Of course, this presumes that you use the Time_Delta_Sec value to adjust the movements of all your objects my specifying their movement in meters per second and multiplkying that value by the time passed in a particular frame to move them.
The only drawbacks of this method vs frame interpolation is that it can make physics a little more unstable and it makes recording and playing back demos impossible. But that's a small price to pay for the incredible simplicity of it compared to frame interpolation methods.
Const MAX_FPS = 60
Min_Frame_Time = Floor(1000.0/Float(MAX_FPS))
Current_Time = MilliSecs()
Game_Start_Time = Current_Time
Repeat
Time_Old = Current_Time ; Store the time the last frame began.
Current_Time = MilliSecs() ; Store the time at the start of this frame.
Time_Delta = Current_Time - Time_Old ; Calculate how long the last frame took.
Time_Delta_Sec# = Float(Time_Delta)/1000.0
UpdateWorld ; Handle collisions.
RenderWorld ; Render the current 3D view to the back buffer.
Flip True ; Swap the back buffer with the front buffer.
Time_Passed = MilliSecs() - Time_Old ; Calculate how long this frame took to render including the flip.
Time_Left = Min_Frame_Time-Time_Passed ; Calculate the amount of additional time we should wait to stay below MAX_FPS.
Delay(Time_Left) ; Delay for that amount of time.
If Not HasFocus() ; If the game lost focus...
Repeat ; Pause the game until focus has been regained.
Delay(100) ; Using delay dramatically reduces the amount of CPU power the game uses!
Until HasFocus()
Current_Time = MilliSecs() ; Correct the time.
EndIf
Until Quit_Game