|
Sub Pause(seconds as Single)
Dim initTime as Single initTime = Timer Do: Loop Until Timer >= initTime + seconds End Sub Sub Pause(seconds as Single) Dim initTime as Single initTime = Timer Do Loop Until Timer >= initTime + seconds Or _ (Timer < initTime And Timer > initTime + seconds - 86400) End Sub 'If you don't need the pause to be really precise, and 'you're satisfied with an integer number of seconds, you can 'also use this simpler approach: Sub Pause(seconds as Single) Dim initTime as Date initTime = Now Do: Loop Until DateDiff("s", initTime, Now) >= seconds End Sub |