From owner-freebsd-hackers Mon Sep 2 12:33:23 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEABA37B400 for ; Mon, 2 Sep 2002 12:33:20 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7BA443E6A for ; Mon, 2 Sep 2002 12:33:19 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.3/8.12.2) with ESMTP id g82JXGvV055510; Mon, 2 Sep 2002 21:33:16 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Matthew Dillon Cc: hackers@FreeBSD.ORG Subject: Re: 64 bit API/ABI changes proposal for -current In-Reply-To: Your message of "Mon, 02 Sep 2002 12:28:35 PDT." <200209021928.g82JSZNK032622@apollo.backplane.com> Date: Mon, 02 Sep 2002 21:33:16 +0200 Message-ID: <55509.1030995196@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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