Event-based timer interrupts

This line enables Timer 1 compare interrupts:

  //enable timer compare interrupt:
  TIMSK1 |= (1 << OCIE1A);

If you don't want them at that point omit it. Put that line where you want the interrupts to go on. To turn them off:

  //disable timer compare interrupt:
  TIMSK1 &= ~(1 << OCIE1A);