There is many a comment on these here pages along the lines of “Why did you use a microcontroller, when you could just have easily used a 555 timer!” And, yes, we sometimes agree with the sentiment, ...
A timer is a simple counter! The input clock of microcontroller and operation of the timer is independent of the program execution.All the Atmel microcontrollers have Timers as an inbuilt peripheral.