Is this possible to loop more than one function using one timer?
Solved
General and Desktop
-
this is a simple task and common when there are few timers available. set a time interval as the lcd (least common denominator) of the needed period, then in the timer service routine count how many times the timer expired and call the correct function in a conditional statement.
In your case interval is 1sec.
on 2 expirations execute function1
on 3 expirations execute function2
on 4 expirations execute both 2 and 4 (or just 4 if that's your intention)And you probably would not want to directly call the functions, but instead emit signals from the timer service routine.