Best way to reset timer-interrupt and disable it for a while?

Hi! I'm currently playing with timer interrupts and I want to start a timer when an event happens. After the timer-interrupt has happened, I want disable it until the event happens again. The timer period should be the same, so I need to reset the counter at some point:

TCNT = 0;

Now as far as I can see - there's two ways of disabling the timer-interrupt. But I wonder what's best to do.

  1. Timer-interrupt occurs → disable interrupt via TIMSK → event occurs → Reset counter (TCNT) → enable interrupt via TIMSK.

  2. Timer-interrupt occurs → disable counter via TCCR → Reset counter (TCNT) → event occurs → enable counter via TIFR.

(Disabling the counter via TCCR by setting CS10, 11 & 12 to 0)

Also, should I clear the TIFR after disabling** counter in 2nd method?**

I would use Option 1

You should clear TIFR immediately before re-enabling the interrupt.

...R

Alright - thanks!