Question

I have 3 clock compenents in my app. They have same TimeInterval's but they should start to fire at different times. clock1 should fire when app started. clock2 should fire after 250 ms after clock1 fires. and clock3 should fire 50 ms after clock2 fires. How can i handle it?

Was it helpful?

Solution

Are you aware, that the TimerInterval is from the time you exit the Clock.Timer procedure until it restarts, ie if TimerInterval is 1000ms (1 second) and it takes 45ms for the phone to do your blocks the total time between any one block will be 1045ms, see here for more info and an example (TimerCheck.zip) which demonstrates that....

Therefore a solution with timers will not be 100% correct ...

Here is a solution which should work with only 1 clock component

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top