From owner-freebsd-current@FreeBSD.ORG Wed Dec 19 10:03:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2563A531; Wed, 19 Dec 2012 10:03:34 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx1.freebsd.org (Postfix) with ESMTP id 898658FC16; Wed, 19 Dec 2012 10:03:33 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id m8so2063896vcd.36 for ; Wed, 19 Dec 2012 02:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=e2OnjHZR5gvjn99Aks5MWvPKVpUHayeKe6gYI/7v3no=; b=kCneGXbC1/yYEy9kNEE9Up3LjxNNqV7T57XQmTPOvPx77cvdN58rpME15iNYAKwHEH OU0bQtNBwxHRctgcV4r55u9cYrbxRF2Ds+1jaOm0F8auwbCL79JRx22YoIVmNkwZAK5X cWKFquIhEn69zIZdWRovbPSNCB8TyIJPzNy1CWysDjfqmyvLYMpsQ85hR+P/Igv2s1Nc 3PF10qqa4qXV/zwD+c518rjKtR31pzQWTc+j2l5TAoB4vDfYMJCMFB1X9leEMs/QSrUd 1BdHNXUuz7J6mA9Fkj7GaKubPa6tiXbnGYXAXiGtC+ww2uI+ovPRI+pCohjL67jWCuCL HXKQ== MIME-Version: 1.0 Received: by 10.220.154.148 with SMTP id o20mr7834553vcw.54.1355911412603; Wed, 19 Dec 2012 02:03:32 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.58.229.136 with HTTP; Wed, 19 Dec 2012 02:03:32 -0800 (PST) In-Reply-To: <14604.1355910848@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> Date: Wed, 19 Dec 2012 02:03:32 -0800 X-Google-Sender-Auth: 5j9_ioOEHcmA53K-Ww31vnAW9gM Message-ID: Subject: Re: API explosion (Re: [RFC/RFT] calloutng) From: Davide Italiano To: Poul-Henning Kamp Content-Type: text/plain; charset=ISO-8859-1 Cc: Ian Lepore , Alexander Motin , phk@onelab2.iet.unipi.it, freebsd-current , "freebsd-arch@freebsd.org" , Luigi Rizzo X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 19 Dec 2012 10:03:34 -0000 On Wed, Dec 19, 2012 at 1:54 AM, Poul-Henning Kamp wrote: > -------- > In message <1355873265.1198.183.camel@revolution.hippie.lan>, Ian Lepore writes > : >>On Tue, 2012-12-18 at 23:58 +0100, Luigi Rizzo wrote: > >>I'm not so sure about the 2^k precision. You speak of seconds, but I >>would be worrying about sub-second precision in my work. > > It is a bad idea, and it is physically pointless, given the stabilities > of the timebases available for computers in general. > > Please just take my word as a time-nut, and use a 32.32 binary format > in seconds (see previous email) and be done with it. > > -- > 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. Right now -- the precision is specified in 'bintime', which is a binary number. It's not 32.32, it's 32.64 or 64.64 depending on the size of time_t in the specific platform. I do not really think it worth to create another structure for handling time (e.g. struct bintime32), as it will lead to code duplication for all the basic conversion/math operation. On the other hand, 32.32 may not be enough in the long future. What do you think about that? Thanks, Davide