Re: HEADS UP! MAJOR change to FreeBSD/sparc64

From: Garance A Drosihn <drosih_at_rpi.edu>
Date: Fri, 19 Mar 2004 12:01:25 -0500
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
Received on Fri Mar 19 2004 - 08:01:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC