I have a program that displays current time and date in a header, the display rolls past midnight most of the time. If the DOS box does not have focus when the SLEEPER routine returns between 23:59:50 and 00:00:00 the time and date will not update until a key is pressed. Any other time the time is updated after the focus is regained. This is loop that updates the time.
DO
c.SystemDate = Date2Num(QDATE("U"), "")
Call DisplayHeader
SLEEPER 10
Ky$ = UCASE$(INKEY$)
LOOP WHILE Ky$ = "" or INSTR(ValidKeys$, Ky$) = 0
TIA
DO
c.SystemDate = Date2Num(QDATE("U"), "")
Call DisplayHeader
SLEEPER 10
Ky$ = UCASE$(INKEY$)
LOOP WHILE Ky$ = "" or INSTR(ValidKeys$, Ky$) = 0
TIA
Comment