From owner-freebsd-arch Fri Oct 26 12:15:19 2001 Delivered-To: freebsd-arch@freebsd.org Received: from devonshire.cnchost.com (devonshire.concentric.net [207.155.248.12]) by hub.freebsd.org (Postfix) with ESMTP id 245BC37B406 for ; Fri, 26 Oct 2001 12:15:14 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by devonshire.cnchost.com id PAA17908; Fri, 26 Oct 2001 15:14:59 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200110261914.PAA17908@devonshire.cnchost.com> To: Poul-Henning Kamp Cc: Peter Wemm , arch@FreeBSD.ORG Subject: Re: 64 bit times revisited.. In-reply-to: Your message of "Fri, 26 Oct 2001 20:34:58 +0200." <5685.1004121298@critter.freebsd.dk> Date: Fri, 26 Oct 2001 12:15:00 -0700 From: Bakul Shah Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > >Okay, how about this? Define N types that will be > >*exactly* the same on *all* machines: > > > > time_t 32 bits (1 second resolution, upto yr 2038) > > nstime64_t 64 bits (10^-9 second resolution, upto yr 2554) > > Should be 1/2^32 resolution or you have a math nightmare dividing > by 1000000000 all the time. On my 500Mhz PIII it takes about 4.6ns to divide a 64 bit number by a 64 bit 10^9. > > zstime128_t 128 bits (10^-21 second resolution, 10 billion yrs) > > here: resolution 1/2^64 second. > > Decimal computers lost the race and they ain't coming back. We want > arithmetic on binary computers to be fast and simple. Most everyone uses powers of ten for timing units. Remember, millisecond, microsecond, nanosecond, picosecond?! All test equipment time in units of 10s not 2s. That is also why CPUs have clock rate in multiples of 10^6 Hzs not 2^20. It is just being practical even if division by a power of 10 is a bit of a pain. > >BTW, this discussion should be conducted on comp.std.internat > >as it affects all OSes, not just FreeBSD. > > Well, sorry, ENOTIME from here. Well, *someone* from FreeBSD core should be participating. At least tell people there what you are planning to do. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message