Alternate clock to millis()

Hello!
I am using the below library and instructions in order to put my UNO on sleep mode when it does not have anything to do for a while:
#include <LowPower.h>
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
This effectively puts my UNO in sleep mode for 8 seconds.
Problem: I am also using millis() to keep track of time, and this method seems to reset millis() to zero every time it is used, so my program does not work any more...
Is there another clock that is accessible and not turned off or reset by this method? how to use it?
Eventually I want to migrate to a Pro Mini, so the solution should work there, too.
Ultimately, the project should work on regular AA batteries, it will look like a small wall clock with hands that move only every 15 minutes, and a simple stepper motor mechanism activated once in a while.
Cheers!

Let's start easy, a Uno and a Pro Mini are identical if you use a 16MHz version. But that's not a very good choice for battery operation. The 8Mhz version is an is 99% the same :slight_smile:

But it resets? Really? I would think it would indeed not count but reset, don't think so (or the library is really bad). But if you want to use millis() just don't put the Arduino that far a sleep. Use a sleep mode where the counters still tick :slight_smile:

It shouldn't reset millis() to 0 - it should just keep millis() from advancing while it's sleeping. That's the point of sleep, it turns off everything except the watchdog timer - including the timer that millis() uses to keep time (millis also requires the processor to do a little math every millisecond or so when the timer overflows); this precludes use of sleep mode if you need millis() to keep time.

Either add an external RTC module that you can ask for the time when you wake up, or count 8 second wakeup cycles to see how long you've been asleep. The watchdog clock is not very accurate, so if it needs to keep good time, you're looking at an RTC module.