[Tinyos-devel] LocalTime interface

Miklos Maroti mmaroti at math.u-szeged.hu
Mon Dec 3 06:09:27 PST 2007


Obviously you need a new interface for that: say LocalTime64 or something,
but maybe it would be better to

1) use the generic Counter interface for this, or
2) move LocalTime to generic as well.

Miklos

On Dec 3, 2007 3:05 PM, Andreas Koepke <koepke at tkn.tu-berlin.de> wrote:
> But how do I call LocalTime.get() on this component? It will reduce the
> value back to 32 bit...
>
> Miklos Maroti:
>
> > Hi Andreas,
> >
> > Use TransformCounterC to get a 64-bit counter, then write your
> > version of localtime similar to CounterToLocalTimeC. All this
> > is from lib/timer. (Or you would easily do this by hand and
> > with a periodic timer that gets executed at least once at every
> > 0.75 days to notice that you are close to overflow on the 32-bit
> > integer).
> >
> > Best,
> > Miklos
> >
> > On Dec 3, 2007 2:49 PM, Andreas Koepke <koepke at tkn.tu-berlin.de> wrote:
> >> Hi guys, I'm experimenting a little with synchronization and use the
> >> 32kHz clock for this. Unfortunately, the LocalTime interface is only 32
> >> bit wide, so that I have to handle clock wraps every 1.5 days. What
> >> would be the best way to introduce a 64 bit wide LocalTime interface?
> >>
> >> Best regards, Andreas
> >>
> >> _______________________________________________
> >> Tinyos-devel mailing list
> >> Tinyos-devel at Millennium.Berkeley.EDU
> >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
> >>
> >
>
>


More information about the Tinyos-devel mailing list