// Hardware Timer sketch 2: Print a message every twelve hours precisely.

// Even though interrupts are disabled and we need to be quick, we can
// do (a modest amount of) printing inside a hardware timer handler,
// because the print functions don't actually wait to perform the
// output themselves, they just pass the data to the core software to
// ship out when it can.
void myTimerHandler() {        
  println("another twelve hours");
}

void setup() {
  Timer1.begin(1000000,60*60*12); // One second tick, 12 hour lap 
  Timer1.setLapHandler(myTimerHandler);  // Register a per-lap handler
  Timer1.start();                        // And start the timer
}

void loop() { 
  /* Nothing to do */
}
