I believe the first timer2 fire will be at 12000,
since it gets started on the first 2000 REPEAT fire.
However at that point timer1 will also fire and
you will start getting overlapping events as both
timers will effectively be on 2000 REPEAT cycles.

MS

BAI LI wrote:
> Hi,
>  
> I am confused about the timer strucuture. someone could clarify it for 
> me? Thanks.
>  
> In the following code,
> ********************
> call Timer1.start(TIMER_REPEAT,2000);
>  
> event result_t Timer.fired(){
>   call Timer2.start(TIMER_ONE_SHOT,10000);
> }
> *******************
> so the timer1 is triggered every 2000 time units. However, in the timer1 
> strucuture, I have timer2 which will be triggered at 10000 time units. 
> What is the order to proceed the above code. like the following?
>  
> trigger timer1 at 2000
> trigger timer1 at 4000
> trigger timer1 at 6000
> trigger timer1 at 8000
> trigger timer1 at 10000
> trigger timer2 at 10000?
>  
> Any help would be appreciated!
>  
> Regards,
> Peter
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to