Keep in mind the LocalTime returns the amount of time since bootup. You can
always send the current time in 32bit format from the PC to the mote and
save that so when you do an update it will return the current time. You'll
probably have to do some calculations from that variable and localtime.

 

I have a 4byte time and a 2 byte overflow for when it rolls over. We
calculate the current time from Jan 1 2000 (instead of the 1979 unix) using
those variables. Just an idea you can use.

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Ruben
Catteeuw
Sent: Thursday, January 22, 2009 8:18 AM
To: [email protected]; [email protected]
Subject: Re: [Tinyos-help] current time

 

Hello,
 
>From TEP102:
 


LocalTime


The LocalTime interface exposes a 32-bit counter without overflow utilities.
This is primarily for application code that does not care about overflow
conditions.

interface LocalTime<precision_tag>
{
  async command uint32_t get();
}

get() 

return the current time. 

 

So,  call LocalTime.get() returns the expired time since startup.
 
kind regards
 
Ruben



  _____  


Date: Thu, 22 Jan 2009 05:56:28 -0800
From: [email protected]
To: [email protected]
Subject: [Tinyos-help] current time



hi all,

 

I need some help

 

in TinyOS 2.x  is there any way to give the current time

what I want is :

when some special message received I need to save the time of receiving in
some variable 

how can I do that?

 

 

thanks in advance,

 

  _____  

Weer helemaal in het nieuw! Hotmail
<http://www.windowslive-hotmail.com/comingsoon/nl/default.htm> .

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to