As mentioned in this list before, you can't use Unix's getTimeofDay()
function beacause it simply isn't supported in TinyOS. YOu can get
the local time of a mote via the LocalTime interface however. Search
the email list for a description of how to use this.
Kevin
On Thu, May 8, 2008 at 12:51 AM, Varun Jain <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi Kevin,
>
> I am trying to get the current time by using the function "gettimeofday()"
> from /sys/time.h in the following way in PrintfControl.startdone event:
>
>
>
> struct timeval first;
>
>
>
> printf("\nTesting starts at %d\n", gettimeofday(&first, NULL));
>
>
>
> But when I am compiling, it is saying that sys/time.h file not found and
> some other time it is saying "undefined reference to gettimeof day" when it
> is trying to make an object file and thus failing.
>
>
>
> Is there any other way that I can print to serial (the current Day, Date,
> Time) as done by Unix date command..
>
>
>
>
>
>
>
> Thanks,
>
> VJ
>
>
--
~Kevin
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help