The macros already exist. Arduino is based on AVR-LIBC and this contains power macros.
Drmn4ea: I already experimented with some low power setups. My biggest issue was not getting down to <5uA. My biggest issues was getting "over the hump". That is: at startup the reset circuit draws to much power. Since my power source had >30k impendance I never got the device to startup on low power. Once running I was always <5uA average.
Since you probably have way more experience in this area: how do you solve this sepcific problem? Of course I can charge a capacitor for the startup. But how do I detect that I am "over the hump" and how do I then connect power to the processor? Preferably with parts available to an amateur.
My (equivalent) setup is:
3V source with 30-50k say 47k impedance, some yet to be conceived device, an Atmel 328P (aka "Arduino") (running at 1Mhz while awake but sleeping most of the time). The old thread is here:http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1273507808
Any hints would be very much appreciated.