Call:      Timer(unsigned long Time,int TimerNo) 

Input:    Time in mS, TimerNo 

Output:  boolean 

 

When calling this function the first time and TimerNo is not known in the timer structure, a new timer structure will be added to the timer chain. When the defined time is expired, the function returns true for one cycle (one-shot) and is removed from the timer structure at the end of the cycle. In all other cases the function returns false. There is a function available in the serial monitor to check all timers present in the timer chain; TimerId, initial time and time-to-go are presented. The timer can be cancelled by the CancelTimer function.

 

Example:

if (Timer(60000,TimISR)) 

  { 

  ... code ...    

 

0
0
0
s2smodern