[Tinyos Core WG] Unit of time in TOS2
Martin Leopold
leopold at diku.dk
Thu Oct 19 12:23:55 PDT 2006
Hi All.
While reading the Timer TEP (102) a question came up regarding the use
units to denote the precision for the timers. The TEP is confusing on
the part on what TMilli means - is it 1/1024 s or is it 1/1000 s (as the
name suggests). The TEP should be clear and I believe Cory has already
fixed that, but I think the question is a little deeper - mixing 1000
and 1024 units could in the end lead to misunderstandings.
I'm not trying to say that the timer unit should be ms, but that it
would be elegant if the name reflected what you really get - there is
plenty of good reason for using 1/1024 s instead of ms. My feeling is
that even if it's put in the FAQ, tutorials and documentation, at some
point some poor bloke is going to come along and use the TMilli as ms in
a calculation, which is wrong.
So what are the thoughts on this? Is it enough to be precise in the
documentation, or is a name change appropriate?
I ran into Cory and we talked about what the name should be (if it were
to be changed). And resembling the KiB, MiB seems like a good idea, but
unfortunately they don't define negative exponents. So in the spirit of
the kibi/mebi units milli would become milbi and micro would be micbi
and the precision tag names TMilbi/TMicbi.
http://physics.nist.gov/cuu/Units/binary.html
--
Regards Martin Leopold.
Dept. of Computer Science, University of Copenhagen
http://www.diku.dk/~leopold
More information about the Tinyos-2.0wg
mailing list