if your function doesn't need to be called at exact to the millisecond precision, you could just check the millisecs() timer in your main loop and call the routine from there.
Local Time:int = Millisecs() + 1000 ' one second later While Not KeyHit(KEY_ESCAPE) If Millisecs() >= Time 'Check if second is up Time :+ 1000 'add another second to time DoFunction() End If Wend