Command TIMER
 
Description Twenty (20) count-down timers with 1ms resolution - TIMER0 to TIMER19 - v49.25
 
Syntax/Parameters TIMER0 - TIMER19
 
Options

To setup the interrupts:
   
    INT(name,TIMER0,function); to INT(name,TIMER19,function);

To read the remain time before expiry
        LOAD(var,TIMER0);
   
To run  the timer once
        LOAD(TIMER0,time);   // time is in milliseconds

To run the timer multiple times
        LOAD(TIMER0,time,num);     // time is in milliseconds
        num is number of times timer runs, 1 = 1 time, 2 = 2 times etc, 0 = non-stop
      
To clear the timer
        LOAD(TIMER0,0);

 
Example LOAD(TIMER6,1000);     // TIMER6 runs once and expires after one second
LOAD(TIMER9,1000,0);  // TIMER9 runs forever, expiring every second
LOAD(TIMER14,500,5);  // TIMER14 runs five times, expiring every 500ms
LOAD(TIMER3,0);          // Clear TIMER3
LOAD(TIMER17,time);    // TIMER17 runs once and expires after value in var time