there are some sleep modes that leave the timer running at full speed and hence full accuracy
I think that in the deepest sleep it switches to the 1xx khz doodad
Nope. All the other sleep modes turn off the processor clock.
The watchdog is independent of sleeping.
Anybody try this?
He's doing way too much work. The code in <wdt.h> takes care of all the things he's looking-up and and changing.
How accuracy is this?
The watchdog timer is about as accurate as the internal oscillator (the watchdog timer on newer processors appears to be rather good). Unfortunately, it's difficult to use it instead of the time functions.
In addition to this...
Put the processor to sleep (idle mode) at the bottom of loop.
This will also reduce the power consumption...
Locate and open "core_build_options.h" in the Tiny Core files. Towards the top of the file, locate the following #defines and change them to...
Low power / smaller code options
#define INITIALIZE_ANALOG_TO_DIGITAL_CONVERTER 0
#define INITIALIZE_SECONDARY_TIMERS 0
Edit: spelling corrected.