[Tinyos-help] Tr : calculate Time in seconds
Rannouna Rania
rrannouna at yahoo.fr
Tue May 5 00:51:28 PDT 2009
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 <cire831 at gmail.com>
À : Rannouna Rania <rrannouna at yahoo.fr>
Cc : tinyos-help at millennium.berkeley.edu
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 <rrannouna at yahoo.fr> 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
Tinyos-help at millennium.berkeley.edu
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090505/5a510d06/attachment.htm
More information about the Tinyos-help
mailing list