문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top