Why are disabling interrupts before calling millis?
That's covered further up this thread, someone suggested that an interrupt would corrupt data from the millis call, doesn't seem to have any effect in my testing.
Why are you calling delay?
Delay is so the screen flicker on the LCD display isn't terrible. If you run it any faster than 150 milliseconds it starts to blend things together (when the milliseconds readout is running, which isn't in this code).
There are more efficient ways of computing new values for minutes and hours.
I agree that when possible the most efficient path to the objective should be used, but fundamentally does it matter in this loop losing time? Since the loop is just counting up how many milliseconds have iterated between loops and adding it to a value I don't think it has any effect on the loss of time (which is what I'm worried about before beginning to optimize anything).
mem says: perhaps try something like this: . . .
I ran this, after about 3 minutes the Arduino was off by exactly a second, it again is running too slowly.
The only way this could be happening is if the millis() call isn't returning the correct time, which is a function directly of the processor crystal right? Can anyone else test this code (mem's) and see if they're having similar results? I'll run this code on a mega later today and see if I have similar issues or if things clear up; until then any other ideas?
Thanks everyone for help!