From owner-freebsd-arch Fri Oct 26 15:34:10 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 0C31E37B405 for ; Fri, 26 Oct 2001 15:34:06 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id IAA16269; Sat, 27 Oct 2001 08:33:57 +1000 Date: Sat, 27 Oct 2001 08:33:00 +1000 (EST) From: Bruce Evans X-X-Sender: To: Poul-Henning Kamp Cc: Peter Wemm , Subject: Re: 64 bit times revisited.. In-Reply-To: <23015.1004077694@critter.freebsd.dk> Message-ID: <20011027081803.N90305-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Fri, 26 Oct 2001, Poul-Henning Kamp wrote: > BUT, i would like to point out a problem in the other direction: > > We are now routinely talking about GHz+ CPUs, but struct timespec > can only do nanosecond resolution and arithmetic on timeval and > timespec sux badly. > > I would like for us to introduce a new format of timestamps: > > struct time$something { > time_t tx_sec; /* 64bit */ > uint_64_t tx_fsec; /* binary fraction of second */; > } > ... > Comments ? I happen to think that such micro-optimizations turn out to be much more trouble than they are worth. -- phk All final consumers of timestamps need decimal fractions, since syscall interfaces only pass timevals and timespecs. I suspect the above change won't make much difference to the amount of timefoo arithmetic, because most of it is for final consumers. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message