Basic example how to use timer-interrupts

recently I wrote a demo-code for Arduino Uno how to configure timer2 to invoke interrupts with a regular frequency for creating stepper-motor-pulses.

After some search I did find this demo file

    #include <TimerTCC0.h>

    bool isLEDOn = false;
    char time = 0;

    void setup() 

    pinMode(13, OUTPUT);    

    void loop()
    time ++;
    if(time == 10)TimerTcc0.detachInterrupt();
    else if(time == 20)
       time = 0;

    void timerIsr()
    digitalWrite(13, isLEDOn);
    isLEDOn = !isLEDOn;

With this demo-code it is the same like with most other demo-codes
very poor documentation.

there is the function-call

initialize timer with 1 million. So what does this exactly mean?
Count up to one million before an interrupt is invoked?
Where can I find information how to calculate a “calling-frequency”

best regards Stefan

P.S. This forum looks very similar to the new arduino-forum
but formatting behaves different. What do I have to write to make an entire sketch appearing as a code-section?