Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2012 01:06:48 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Davide Italiano <davide@FreeBSD.org>, Ian Lepore <freebsd@damnhippie.dyndns.org>, Alexander Motin <mav@FreeBSD.org>, phk@onelab2.iet.unipi.it, freebsd-current <freebsd-current@FreeBSD.org>, Bruce Evans <brde@optusnet.com.au>, "freebsd-arch@freebsd.org" <freebsd-arch@FreeBSD.org>
Subject:   Re: API explosion (Re: [RFC/RFT] calloutng)
Message-ID:  <20121220005706.I1675@besplex.bde.org>
In-Reply-To: <16439.1355922282@critter.freebsd.dk>
References:  <50CF88B9.6040004@FreeBSD.org> <20121218173643.GA94266@onelab2.iet.unipi.it> <50D0B00D.8090002@FreeBSD.org> <50D0E42B.6030605@FreeBSD.org> <20121218225823.GA96962@onelab2.iet.unipi.it> <1355873265.1198.183.camel@revolution.hippie.lan> <14604.1355910848@critter.freebsd.dk> <CACYV=-Eg542iHm9KfujPvCzZrA4TqepEBVA8RzT1YOHnCgfJnA@mail.gmail.com> <15882.1355914308@critter.freebsd.dk> <20121219221518.E1082@besplex.bde.org> <16439.1355922282@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Dec 2012, Poul-Henning Kamp wrote:

> --------
> In message <20121219221518.E1082@besplex.bde.org>, Bruce Evans writes:
>
>>> With this format you can specify callouts 68 years into the future
>>> with quarter nanosecond resolution, and you can trivially and
>>> efficiently compare dur_t's with
>>> 	if (d1 < d2)
>>
>> This would make a better general format than timevals, timespecs and
>> of course bintimes :-).
>
> Except that for absolute timescales, we're running out of the 32 bits
> integer part.

Except 32 bit time_t works until 2106 if it is unsigned.

> Bintimes is a necessary superset of the 32.32 which tries to work
> around the necessary but missing int96_t or int128_t[1].
>
> [1] A good addition to C would be a general multi-word integer type
> where you could ask for any int%d_t or uint%d_t you cared for, and
> have the compiler DTRT.  In difference from using a multiword-library,
> this would still give these types their natural integer behaviour.

That would be convenient, but bad for efficiency if it were actually
used much.

Bruce



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