One more thing that should be mentioned here: Be careful of midnight reset, if your timer process is important and program execution can occur as the clocks switch over.
At 11:59:59 PM, your timer will be 86399.999999 (or something like that, if my math is off).
At 12:00:00 AM, the timer resets back to 0.0.
If your code is something like this, it’ll fail:
T# = TIMER
DO
… stuff
LOOP UNTIL TIMER > T# + 1
Basically, the above is a loop that does stuff for 1 second, before it exits the loop. Problem is, it becomes an endless loop which can never reach the exit condition, if it was run at 11:59:59 PM. It’s a time bomb hidden in your code!
Easiest solution to this type issue?
Just plug in and use my ExtendedTimer function instead! 🤩
https://www.qb64.org/forum/index.php?topic=1598.0