I have a loop that can execute for a fairly long time and was triggering the WatchDog timer in the Simulator.
I've made changes so that the operations are executed in multiple passes, limiting the number of times through the loop on each pass by taking the starting time from Sys.getTimer() then before starting each successive pass I call Sys.getTimer() and check for the number of mS passed.
My successive passes are run on a 1 second interval using a timer callback.
From other posts in the forums I read that the WatchDog is set to something around 5 Seconds. I also saw something that indicated that the WatchDog isn't time based, it's counting op codes executed or some equivalent.
I figured with each pass being started on 1 second intervals, if I exit the loop after 200ms I should be really safe.
That's not how it works. The WatchDog gets triggered at various times before my loop reaches 100mS according to Sys.getTimer().
If you understand the relationship between the WatchDog and the values returned from Sys.getTimer() in the simulator, please explain to I can choose a bullet proof way to let my code execute in the Simulator and in real devices without being terminated by the WatchDog and without sitting idle for a high percentage of the time.
Thanks