How about function pointers? You could point a function pointer to the
function desired and call the pointer in the timer.fired().
Never tried it, but sounds simple enough.
Sankar.
On Thu, 13 Jul 2006 12:10:09 -0500, Tony Han <[EMAIL PROTECTED]> wrote:
Hi Sankar, thank you for your quick reply, I am currently using timer for
that purpose. Since I need pause my program in many different places,
using
timer will make the program too ugly to read in the future. I just want
to
know if there exist some function that will make it simple. But you are
right, timer works. Thanks again.
Tony
On 7/13/06, Sankar Gorthi <[EMAIL PROTECTED]> wrote:
I'm not sure if it's really a good idea, but I just add a timer and fire
it when I need to pause for a certain amount of time. Increment a
counter
inside the timer.fired() event and then go back to the execution. Needs
a
LOT of preplanned seperation and compaction of code, but it works.
Sankar.
On Thu, 13 Jul 2006 10:51:09 -0500, Tony Han <[EMAIL PROTECTED]>
wrote:
> Hey,
>
> I am wondering in NesC, is there any function can make program wait
for
a
> few seconds? things like Sleep(10) in C++ or something similar.
Anything
> can
> make program pause for a while.
>
> Thanks
>
> Tony
--
No opera plot can be sensible, for people do not sing when they are
feeling sensible. - W. H. Auden
--
No opera plot can be sensible, for people do not sing when they are
feeling sensible. - W. H. Auden
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help