From owner-freebsd-current@FreeBSD.ORG Sat Oct 29 16:00:54 2005 Return-Path: X-Original-To: current@freebsd.org 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 6308716A41F; Sat, 29 Oct 2005 16:00:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05A1F43D46; Sat, 29 Oct 2005 16:00:53 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j9TFxnFt076039; Sat, 29 Oct 2005 09:59:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 29 Oct 2005 09:59:52 -0600 (MDT) Message-Id: <20051029.095952.29330299.imp@bsdimp.com> To: PeterJeremy@optushome.com.au From: "M. Warner Losh" In-Reply-To: <20051029084716.GY39882@cirb503493.alcatel.com.au> References: <20051029005719.I20147@fledge.watson.org> <37685.1130571501@critter.freebsd.dk> <20051029084716.GY39882@cirb503493.alcatel.com.au> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 29 Oct 2005 09:59:49 -0600 (MDT) Cc: phk@phk.freebsd.dk, rwatson@freebsd.org, current@freebsd.org Subject: Re: Timers and timing, was: MySQL Performance 6.0rc1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 29 Oct 2005 16:00:54 -0000 In message: <20051029084716.GY39882@cirb503493.alcatel.com.au> Peter Jeremy writes: : Most applications will do all their timekeeping using a single set of : clock calls so I don't think this is especially serious. Does POSIX : require any guarantees about (eg) clock_gettime(CLOCK_REALTIME), time() : and gettimeofday() returning identical values? Can we claim "rounding : and truncation" to explain the discrepancies? I'm not sure that most of them do. I've seen all three used in the libraries we have at work, for example. It would be nice if the inaccuracies were well documented... Warner