I'm not exactly sure of that particular interface in TOS 1.x but, i remember that in TOS, the milli counter ticks 1024 times per second not 1000, so this might account for some of the time difference.

-Paul
Mohammad S. Hashemian wrote:
Hi all,
In the application I'm working on, I need to know the exact time of a specific event, so I recorded the time turned on the mote, and I programmed the mote to put the time value in the packet as well (using Time.getLow32() and Time.getHigh32, Time is SimpleTime.Time interface), using this value and adding it to the base time (the time I turned the mote on) I should be able to compute the time which event occured. The problem is that this time increases faster than it should. For example suppose the event is firing a timer in code which occur every 4 seconds, and in the timer event handler, I put the time value and send it to the server PC. In such a test, the difference between time that server receives the packet and the computed time (time value in the packet + base time which I turned the mote on) is zero, but after 15 minutes the reported time is 20 seconds ahead of the current time, and this value increases that for example in 2 days, the reported time by mote is 64 minutes ahead of the current time. The procedure of computing time (recording the mote start time and adding the reported time to it) seems straight forward and correct, so the only problem I can think about is inaccuracy of clock in the mote. I tested this on couple of motes but all of them had the same problem, so do you think if the problem is in the way I implemented my test or it's just some inaccuracy in mote's clock?
BTW I use MicaZ motes with TOS 1.1
Thanks all,
Mohammad
------------------------------------------------------------------------

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

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

Reply via email to