Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2001 08:33:00 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Peter Wemm <peter@wemm.org>, <arch@FreeBSD.ORG>
Subject:   Re: 64 bit times revisited.. 
Message-ID:  <20011027081803.N90305-100000@delplex.bde.org>
In-Reply-To: <23015.1004077694@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011027081803.N90305-100000>