[Tinyos-help] current time
Shaun Lawrence
slawrence at invocon.com
Fri Jan 23 06:42:37 PST 2009
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: tinyos-help-bounces at millennium.berkeley.edu
[mailto:tinyos-help-bounces at millennium.berkeley.edu] On Behalf Of Ruben
Catteeuw
Sent: Thursday, January 22, 2009 8:18 AM
To: meryana26 at yahoo.com; tinyos-help at millennium.berkeley.edu
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: meryana26 at yahoo.com
To: tinyos-help at millennium.berkeley.edu
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> .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090123/cdb4278f/attachment-0001.htm
More information about the Tinyos-help
mailing list