Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Sep 2002 21:33:16 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: 64 bit API/ABI changes proposal for -current 
Message-ID:  <55509.1030995196@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 02 Sep 2002 12:28:35 PDT." <200209021928.g82JSZNK032622@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200209021928.g82JSZNK032622@apollo.backplane.com>, Matthew Dillon w
rites:
>
>:>	struct timeval64 {
>:>		time64_t	tv_sec;
>:>		int64_t		tv_frac;	/* N/2^63 fractional */
>:>	};
>:
>:We have this one already, and it's called bintime, except that it
>:correctly uses N/2^64 fractional the way binary computers prefer it.
>:
>:-- 
>:Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
>
>    Hmm.  That's certainly a reasonable point.  I suppose a negative
>    representation is still possible if one considers the entire 128
>    bit word as a 128 bit fractional time.
>
>    All right, I'll amend the proposal to use 2^64.  the fractional
>    element will be unsigned, the tv_sec will remain signed.

That is exactly how bintime is defined :-)

	struct bintime {
		time_t	sec;
		uint64_t frac;
	};

If I had a int128_t, I would have used that instead...


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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