Call:      DelayTimer(unsigned long Time,int TimerNo) 

Input:    Time in mS, TimerNo 

Output:  boolean 


New timers are added to the pointer chain when calling this function. 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. Every cycle the function is called, the current time is checked. When the defined time is expired, the function returns true. Otherwise 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 and removed from the timer list by the CancelTimer function. You can restart the timer by calling function RestartDelaytimer with the same timer no.



if ((DelayTimer(20000,TimDOTL)) && (DigHigh("OPENDOOR")) Activate("BUZZER");