Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-04-16 16:35:27


At 03:10 PM 4/16/2002, Jeff Garland wrote:
>
>> I *strongly* feel that the gdtl
>> namespace "plumbing" *must* provide a mechanism for universal
>> representation. Every time system then is free to provide it's own
>> representation, but must support translation to and from the universal
>> representation. Templated functions would then allow conversion from
any
>> time system representation to any other time system representation
>through
>> this universal representation. With out this, there's little point in
>
>I also once believed this, but I have been convinced that no such
>'universal representation' exists. Just as an example, if I build a
>'geological time system' that has a resolution of 1000 years, what
>'universal reference system' would I use for conversion to TAI? Luckily
in
>this case there really wouldn't be a need to do such a conversion.
>Anyway I believe that, each one of these conversion
>functions, to operate correctly, depends on the limitations of the
>particular systems (epoch and
>resolution) and hence needs to be considered individually.
>
>So currently there is no infrastructure for this...

When does conversion matter? One case is when a user of one time system
needs to pass a time to a library which happens to use another time system.

Now if the epoch and resolution of the two time systems is incompatible, it
isn't surprising that there isn't a conversion between them.

But what happens when in fact, at least for some values, the epoch and
resolutions are close enough that conversion is possible. Could you give
an example of how to call a library function requiring a certain time
system argument, when your program has the value stored in a different time
system?

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk