There is this function in sim_tossim.c sim_time_t sim_time();
It returns the simulation ticks (simulation cycles). TOSSIM has 10000000000 ticks per second. However, the simulation clock only gets incremented at the start of new simulator event, the processing time is not captured by the simulation clock. TOSSIM models hardware timer interrupts with 100% accuracy. If you need higher accuracy then I strongly recommend Avrora or TimeTOSSIM (from tinyos-2.x contrib repository: TimeTOSSIM only works with the very first release of tinyos-2.x). Hamad On Thu, Jul 29, 2010 at 6:46 PM, Newlyn Erratt <[email protected]> wrote: > All: > > I am trying to determine if there is a way to find cycles in TinyOS. I know > that I can find time but is there any simple method for cycles? I do know > that TOSSIM isn't cycle accurate but I need a ballpark estimate between two > different applications. Thanks for any help. > > Newlyn > > _______________________________________________ > 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
