Re: [Tinyos-help] Calculate time taken for a function execution.

2013-12-19 Thread Xiaohui Liu
Hi everyone, AFAIK, TOSSIM does not simulate execution time. -- -Xiaohui Liu TelosB TinyOS 2.1.2 www.cs.wayne.edu/xliu/ On Sat, Dec 7, 2013 at 8:23 PM, Eric Decker wrote: > > you probably should also use LocalTimeMicroC for better resolution. > > I don't know how that behaves in the SIM envi

Re: [Tinyos-help] Calculate time taken for a function execution.

2013-12-07 Thread Eric Decker
you probably should also use LocalTimeMicroC for better resolution. I don't know how that behaves in the SIM environment... I know it works in the real world. On Sat, Dec 7, 2013 at 3:53 AM, nivedita datta wrote: > I am trying to calculate the time taken by a function that I wrote. I am > usi

Re: [Tinyos-help] Calculate time taken for a function execution.

2013-12-07 Thread Roadstar Runner
I think you have the wrong format specifier argument. Try %ld instead of %f. Try using dbg("Boot", "Function took %ld millisecs\n", (ts1 - ts) ); On Sat, Dec 7, 2013 at 6:53 AM, nivedita datta wrote: > I am trying to calculate the time taken by a function that I wrote. I am > using the compone

[Tinyos-help] Calculate time taken for a function execution.

2013-12-07 Thread nivedita datta
I am trying to calculate the time taken by a function that I wrote. I am using the component LocalTimeMilliC to do this. I have added the following lines to the configuration file: *components LocalTimeMilliC; TestC.LocalTime -> LocalTimeMilliC;* ...and in the module section of the implementation