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:
*uses interface LocalTime<TMilli>;*
...and in the code:
*uint32_t timestamp, timestamp1;**timestamp = call LocalTime.get();
**...
function called here ...
...
timestamp1 = call LocalTime.get();
dbg("Boot", "Function took %f millisecs\n", (ts1 - ts) );
*
However, it always prints the value as 0.000000 millisecs. Please let
me know what am I doing wrong in this code or if there is a
better method to calculate the time taken for execution of a function.
Thanks for your time & effort.
Regards, Nivedita Datta
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help