title: Why Arduino uses interrupt every 1.024ms in millis function?
body: <p>I am implementing a time counter on my atmega 328p. I looked on the implementation of arduino millis function and I am bit confused, why they use Timer Overflow Interrupt which is executed every 1.024 ms (freg = 16MHz, 64 prescaling), when they could use Output Compare Match Interrupt which can be set up to trigger exactly every 1ms (OCR0A = 249). Is there any advantage to use Timer Overflow Interupt and do some corrections to counted ms over Output Compare Match interupt that is executed exactly every 1ms? Or why they are using it?</p>