Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Mar 2004 12:01:25 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Diomidis Spinellis <dds@aueb.gr>
Cc:        freebsd-current@freebsd.org
Subject:   Re: HEADS UP! MAJOR change to FreeBSD/sparc64
Message-ID:  <p06020442bc80d40bec13@[128.113.24.47]>
In-Reply-To: <405AAC1A.20408@aueb.gr>
References:  <p060204f5bc750679b827@[128.113.24.47]> <200403140716.i2E7GDKa007204@dungeon.home> <p06020404bc7abad600b6@[128.113.24.47]> <200403142317.09065.craig@xfoil.gank.org> <405AAC1A.20408@aueb.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
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@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06020442bc80d40bec13>