I believe that is all correct. Add the proviso that subsequent start()s will "erase" whatever the specific Timer was doing before so if you call REPEAT followed by ONE_SHOT you should only get one fired() event 1000 ticks after the last start().
The ticks are "binary" on (I believe) all platforms, meaning 1024/second. For sub-microsecond timing there are JiffyTimers and others I don't remember offhand. MS ලසන්ති wrote: > > > I was getting confused and frustration on timers concept. > Please, I need help for better understanding. Can anyone say what > happens when i set Timer.start(TIMER_REPEAT,1000) and > Timer.start(TIMER_ONE_SHOT,1000); > > > *First of all, i should tell that these two functions are in TinyOS 1, > not TinyOS 2x. So, you should be working on TinyOS 1. > then your questions: > ** Timer.start(TIMER_REPEAT,1000) : by calling this, you set a timer > which signals a fired() event in every 1000 time. For an example if you > want to read the phenominon in every 1000 time period, then you use > TIMER_REPEAT. > Timer.start(TIMER_ONE_SHOT,1000) : this signals fired() event only once. > * > > > > and what about Timer.fired(). Is Timer.fired() is signaled for > every 1 tick of 1000 ( or ) for every 1000 ticks once. > > * once per every 1000 ticks * > > > > and what about if I want to find a time ( say 0.90 ms ) using timers > for specific mote ( say telosb ). > > *i am not clear what do you mean by this question. But, cal > Timer.getNow() gives the current time.* > > *Note: I am also new to TinyOS, so i guess somebody else will correct > me, if i am wrong or missing something.* > > Lasanthi > > > > > On Wed, Jun 24, 2009 at 11:06 AM, trilok i <[email protected] > <mailto:[email protected]>> wrote: > > Hi to all, > > I was getting confused and frustration on timers concept. > Please, I need help for better understanding. Can anyone say what > happens when i set Timer.start(TIMER_REPEAT,1000) and > Timer.start(TIMER_ONE_SHOT,1000); > > and what about Timer.fired(). Is Timer.fired() is signaled for > every 1 tick of 1000 ( or ) for every 1000 ticks once. > and what about if I want to find a time ( say 0.90 ms ) using timers > for specific mote ( say telosb ). > > IF anyone explains this clearly, I can concentrate on my next work . > > > Thank you. > > ------------------------------------------------------------------------ > Get easy photo sharing with Windows Live™ Photos. Drag n’ drop > <http://www.microsoft.com/india/windows/windowslive/photos.aspx> > > _______________________________________________ > Tinyos-help mailing list > [email protected] > <mailto:[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 _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
