[Tinyos-devel] Re: [Tinyos Core WG] time sync interfaces
Matt Welsh
mdw at eecs.harvard.edu
Tue Dec 18 17:11:43 PST 2007
Right.
On Dec 18, 2007, at 6:42 PM, Philip Levis wrote:
> On Dec 18, 2007, at 3:09 PM, Matt Welsh wrote:
>
>> The applications that we study generally require millisecond or
>> better time synchronization. In general anything that is timing
>> sensitive is going to want to exploit the capabilities of the
>> platform on which it is being developed. A platform-independent
>> time interface is not very useful in these cases. If we're
>> concerned about things like portability for, say, time sync
>> protocols, I suggest that we make the datatype representing time be
>> very fine-grained (say, 1 usec or better) and provide a compile-
>> time constant indicating the true resolution.
>>
>
> The typical way to do this is to have a two-typed interface, where
> the first is the timer fidelity and the second is the width. E.g.,
>
> interface SynchronizedTime<a, b>;
>
> interface SynchronizedTime<TMicro, uint32_t>
>
> That way you get compile-time checks, rather than depend on compile-
> time constants for resolution.
>
> Phil
More information about the Tinyos-devel
mailing list