Hi,
I used : clock_t initial_time; clock_t final_time; float CPU_time; In my code ; initial_time= clock(); tate(mip,P,Q,res);// I need to know the time required by this function final_time=clock(); CPU_time=final_time - initial_time; if I display on the PC this value (CPU_time) I found 15,000 (I think clock ticks but I want in seconds). I hope that is more clear now. Thank you very much. Best Regards, Rania ----- Message transféré ---- De : Eric Decker <[email protected]> À : Rannouna Rania <[email protected]> Cc : [email protected] Envoyé le : Lundi, 4 Mai 2009, 23h35mn 50s Objet : Re: [Tinyos-help] calculate Time in seconds If you are using TimerMilli or LocalTimeMilli each tick is a binary millisec. There are 1024 per second. Not sure from your description what you are trying to do. Can you be clearer? e On Mon, May 4, 2009 at 1:33 PM, Rannouna Rania <[email protected]> wrote: Hi all, Thank you all for your Kind response and your help. In fact I am new in tinyos, so that sometimes I ask questions that seem maybe evident. Now my problem is that I want to calculate the time needed by my application in seconds. I succed to calculate it in clock ticks. Have you any idea how can I do this? I guess I should use the SimpleTime component but I can't understand how to use it (I am going to use the telosb). Thank you very much in advance. Best Regards, Rania _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher Autonomous Systems Lab Jack Baskin School of Engineering UCSC
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
