As far as I know, Timer runs asynchronously, so If a very short duration timer is applied, it would call the Timer Code multiple times in case the previous calling has not finished…
I do not want to call timer if previous calling has not finished as this causes assertion in my program because multiple calls tries to share the single resource at a time ..which gives exception and program terminates…
Please, tell me how can we synchronize timer call with its previous function calls..
Use a semaphore.
Down the Semaphore when you begin the previous call.
Up the semaphore when you finish execution.
The timer can fire at any time, it will hit the semaphore and wait on the current task to be completed before it attempts to access the function.