How to Hijack Timer 0

As I understand it, Timer0 is used to generate the 1ms interrupt.

I would like to hijack this interrupt for a short amount of time and perform a simple task.

I know I could do calls to milli() and test for a change but that is a lot of overhead for such a simple task.

Anyone know how to hijack the interrupt?

Why not use Timer1?

If you tamper with Timer0 you will be screwing up a central part of the Arduino system.

Tell us what you want to do. There may be another way.

...R

You could ditch millis() completely and just set up the timer yourself.

The following code strips away all of millis() and delay(), though it does also stop Tone() and analogWrite() working.

void main(void) {
  sei();
  setup();
  for (;;) loop();
}

void setup(){

}

void loop(){

}