Hi all,i want to calculate the simulation time of an application, so i 
integrated a clock variablein this way:
#include <time.h>
implementation {clock_t time_init, time_final ;     /*  initial time and final 
time in micro-secondes */float  time_cpu;                           /* total 
time in  secondes */ 
..event void Boot.booted()      {               time_init = clock ();           
dbg("Boot", "MESSAGE is:\n");   dbg("Boot", "%.2X %.2X %.2X %.2X %.2X %.2X %.2X 
%.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X \n",pt16[0],pt16[1],pt16[2],       
pt16[3], pt16[4],pt16[5],pt16[6],pt16[7], pt16[8],pt16[9],pt16[10],pt16[11], 
pt16[12],pt16[13],pt16[14],pt16[15]);....
ttime_final = clock ();         temps_cpu = (temps_final - temps_initial) * 
1e-6;               dbg("Boot", "sim_time= % g\n", time_cpu );              }
}
i always get DEBUG (32): sim_time= 01
Have you  any idea how can i get the real simulation time of my code ??
Thanks in advance                                         
_________________________________________________________________
Hotmail : un service de messagerie gratuit, fiable et complet
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to