On Wed, Dec 4, 2013 at 3:55 AM, Default <[email protected]> wrote:
> Hi to all, > I'm new to tinyOS and I have to implement a project in it and i have a > problem. > I want that in my project the nodes wait a random time before sending their > messages, I read online that maybe i have to use the BusyWait interface, > but > i can't find any good example to how use it. > What exactly did you read that gave you the impression you should use BusyWait for this need? BusyWait is NOT what you want. BusyWait as the name implies sits and waits for the specified amount of time to pass. It is not a good use of resources. It exists for the rare cases where one really needs to wait for a small amount of time and the overhead of the rest of the timing system is too painful. It should NOT in general be used generally. It is a special case only and you really need to know what the trade offs are before using it. For general timing needs one should be using TMilli or TMicro timers. Perferably TMilli because that has less demand on the underlying resources. > Can someone help me? (if there is another way instead of using busyWait > there is no problem) > > thanks to all, regards. > > > > -- > View this message in context: > http://tinyos-help.10906.n7.nabble.com/BusyWait-tp23918.html > Sent from the TinyOS - Help mailing list archive at Nabble.com. > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
