My program stops after 9h32m

Hmm, you could try making time0 and time1 of type unsigned long instead of long. If not doesn't work, can you post the complete code for your two programs (or a smaller version that shows the problem)? The ones you've posted don't actually compile. The millis() function operates with interrupts, so it should be just as accurate regardless of your code, with one exception: the delayMicroseconds() function disables interrupts to get better precision, which could throw of the timing of millis(). Or maybe it's just because you're printing minutes instead of seconds?