Hint for using the TimeAlarms Library

Hi,
just struggeled to use the TimeAlarms Library in one of my projects. I read a lot about this Lib and are aware that if the delay function is used, it has to be changed to Alarms.delay. So far so good, but my sketch didn't activate the specified alarms.

For troubleshooting have tried to minimise the code as far as possible in using the standard TimeAlarms Library example but still minimised:

#include <Time.h>
#include <TimeAlarms.h>

void setup()
{
  Serial.begin(9600);
  setTime(8,29,0,1,1,11); // set time to Saturday 8:29:00am Jan 1 2011

  Alarm.timerRepeat(15, Repeats);            // timer for every 15 seconds    
}

void  loop(){  
 // digitalClockDisplay();  // don't need
 // Alarm.delay(1000); // wait one second between clock display
}

void Repeats(){
  Serial.println("15 second timer");         
}

I have nothing in the loop section (which should be fine) and was waiting for the serial output, but it failed !
Then I reactivated the Alarm.delay command and it worked.
Even if I use a minimum Alarm.delay(0) it still works !

In my real project, there is a lot of code in the loop section, but there was nowhere Alarm.delay specified.
Including it now, the Alarms working fine.

Thanks HBDuino for the hint. It was really usefull.

BTW, following your code, if nothing is in the loop... could we put the arduino to sleep to save power? I know there are different levels on the sleep mode... so, if one or more of those levels are able (but remaining the processor taking care of the time) could we could save something of power. Anyone knows if it is possible?

Thanks!