'=========================================================================== ' Subject: DELAY ACROSS MIDNIGHT ROLL-OVER Date: 07-21-97 (13:44) ' Author: Brian Bacon Code: QB, QBasic, PDS ' Origin: kyberteknik@geocities.com Packet: DATETIME.ABC '=========================================================================== 'MDELAY.BAS - delays across the midnight roll-over 'written by Brian Bacon.. No warrenty - period. 'If you want to pay me for this(yeah right) visit my web page. ' http://home.jinko.com/brian/ 'or at least write me mail: kyberteknik@geocities.com 'You can use this is any way you want, just give me a little bit of credit. 'NOTE - Check out these delay values you probably don't want to use... 'if you use .01 it wont change, if you use .02 to .04 it takes .06 seconds 'sometimes .05 takes .06 seconds too, not all the time though 'if you use anything above or equal to .06 it usually works fine. 'I've concluded that this routine takes .05-.06 seconds to run MINIMUM. delay! = .02 PRINT TIMER 'This just prints the timer.. '---The Actual Timing Routine--- Cur! = 0 Start! = TIMER Endt! = Start! + delay! WHILE Cur! < Endt! - .02 'I subtract .02 because this is usually Cur! = TIMER '.02 seconds off, BASIC is slow. IF Cur! < Start! THEN Start! = 0: Endt! = Endt! - 86400 WEND '------------------------------- PRINT TIMER 'This confirms it is the first one +delay! seconds.