HEADS UP! MAJOR change to FreeBSD/sparc64

Garance A Drosihn drosih at rpi.edu
Fri Mar 19 09:01:32 PST 2004


At 10:15 AM +0200 3/19/04, Diomidis Spinellis wrote:
>
>"The range and precision of times representable in clock_t and
>time_t is implementation-defined."
>
>So, indeed there is no guarantee made regarding the size of
>time_t relative to other basic types.  However, time_t must be
>an arithmetic type, it can not be e.g. a struct.
>
>Another interesting possibility that the standard appears to
>allow, is to change the *precision* of time_t.  For example,
>if time_t represented time in two-second intervals ...

Not allowed.  time_t has to be a value of "seconds".  When the
standard talks about "precision", it means we might only UPDATE
that value every 10 seconds, but the value itself is in seconds.

The reason it talks about precision is for the case where time_t
is a float.  In that case, "1.0 time_t's" is still 1 second, but
the implementation might decide to update that value (as returned
from time()) only once per second, or every 0.1 seconds, or
every 0.0001 seconds.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu


More information about the freebsd-current mailing list