Yogesh,
This is a very basic question and answered by the TinyOS tutorials
(as well as documented in many examples). You need to wire two Timers
in your configuration:
AppM.Timer1 -> TimerC.Timer[unique("Timer")];
AppM.Timer2 -> TimerC.Timer[unique("Timer")];
Then in your module
uses {
interface Timer as Timer1;
interface Timer as Timer2;
}
and
StdControl.start() {
call Timer1.start(TIMER_REPEAT,2000);
call Timer2.start(TIMER_REPEAT,5000);
return SUCCESS;
}
-Joe
On Fri, 28 Jan 2005 20:36:07 -0800 (PST), Yogesh Iyer
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I need some help with implementing two timers in the same application. I
> have wired the TimerC component. Tutorial 2 explains that I can have
> multiple timers, but I couldnt understand how to achieve it.
>
> I have wired the TimerC component and doing the following:
>
> StdControl.start() {
> call Timer.start(TIMER_REPEAT,2000);
> return SUCCESS;
> }
>
> This works fine but I need one more timer that fires at 5000 msec. Can
> someone suggest whats the syntax for it. Thanks a lot.
>
> Regards,
> Yogesh.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> Tinyos-help mailing list
> [EMAIL PROTECTED]
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users