On Sunday 06 May 2007 22:38, Muhammad Azhar wrote: > I'm getting a little confused. Assume my current timer is 12000 units > and I call timer.stop(). Then I run it again periodically for 1s, i.e. > timer.startPeriodic(1024). So 1 second later, when I call timer.getNow(), > will I get 13024 (or at least something around this range) or should I > expect to get 1024 since I've just re-started the timer?
TEP 102 requires that the underlying timer resource is always running. That's the only way that functions like startPeriodicAt() can work. So, in your example, timer.getNow() will return a timer value at or after 13024. The actual value will vary because interrupt-driven code could run between the time the underlying timer code schedules your timer's fired event and the timer your fired event executes getNow(). All the best, Steve _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
