Add call address to millisecond interrupt

Many applications need to do something on a regular basis. Clearly the millisecond interrupt is ideal for implementing this.

This interrupt could be made much more useful by being able to set a call address.

Example:

void periodic () 
{
   .
   .
   .
}

millisecond.set (&periodic);

In the above example, the function periodic will be called with every millisecond interrupt.

Yes, I know we are in critical interrupt time and there is a chance that the time spent here could be abused, but "buyer beware".

Currently I have to check if the millisecond count has changed to know if I should execute the code, which is significant overhead.

I have made these changes myself to the ISR and it works well. But I have to apply the changes with each IDE release

I wouldn't exactly call a call to millis "significant overhead".

bolts:
I have made these changes myself to the ISR and it works well. But I have to apply the changes with each IDE release

Can you please describe in detail where you make the change and how you make it, and where do you put your ISR function in the sketch you write to make use of it?

ISR(TIMER0_OVF_vect)
{
    unsigned long m = timer0_millis;
  :
    timer0_millis = m;
    timer0_overflow_count++;
// New code
   TIMER_OVF_Callback();
}

TIMER0_OVF_Callback would be initialized to point to a null function, and would have an API to set it to an arbitrary user function (just like attachInterrupt().)

It's actually a pretty bad idea. The was ISRs work on AVR, having any function call in your ISR causes a rather large number of additional expensive instructions to be added to save and restore context that is defined by the C ABI as "callee changeable."