From owner-freebsd-current@FreeBSD.ORG Fri Jan 21 19:00:11 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2063016A4D0 for ; Fri, 21 Jan 2005 19:00:11 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99B6E43D53 for ; Fri, 21 Jan 2005 19:00:10 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-236-186.ny325.east.verizon.net [68.160.236.186]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id j0LJ06im095047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Jan 2005 14:00:08 -0500 (EST) Message-ID: <41F1519C.1090600@mac.com> Date: Fri, 21 Jan 2005 14:01:48 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Poul-Henning Kamp References: <33041.1106331489@critter.freebsd.dk> In-Reply-To: <33041.1106331489@critter.freebsd.dk> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.9 required=5.5 tests=AWL,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=disabled version=3.0.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pi.codefab.com cc: current@freebsd.org Subject: Re: Anybody involved with ISO C standardization ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 19:00:11 -0000 Poul-Henning Kamp wrote: > In message <41F14659.8040003@mac.com>, Chuck Swiger writes: [ ... ] > Resolution of 2 nanoseconds. > > To get seconds you have to do a 64 bit divide by 500000000 ? > > Anyone here heard about binary computers ? > > Binary fractions please, that we we can simply shift way the bits > we don't want: > > seconds = longtime >> 29; > > (For some value of 29.) Indeed. Some clever person might decide to power of two which was a multiple of 8 or 16 or so, so that you don't even have to shift bits, and you end up with something that resembles (struct timeval). An integral timer with a resolution of 1 tick = 1 second has a lot going right for it. And of course, there is the issue of choosing yet another epoch that nobody else has heard of. If you talk to an astronomer, they really want to standardarize on J2000. -- -Chuck