[Tinyos-help] Creating a 64 bit milliseconds counter
Faisal Aslam
aslam at informatik.uni-freiburg.de
Fri Mar 20 04:20:26 PDT 2009
Hi,
The counter TinyOS gives from LocalTime interface is 32-bit by default
hence it overflow very quickly. I need to create a 64 bit milliseconds
counter.
I will be very thankful if someone can share some code that how can I do
it?
A simple solution could be that I catch overflow event of Counter
interface and have a local variable of a bigger precision.
However, I do not know how to do it in a platform independent manner and
what component provides implementation of Counter interface across all
platforms.
Another problem is that we want the counter to continue counting even
when TinyOS goes to low-power state. I do not know how it is possible?
I will be very thankful if someone can help me with this or share his
code with me.
best regards,
Faisal
More information about the Tinyos-help
mailing list