From owner-freebsd-hackers Mon Jan 3 12:18:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from kronos.alcnet.com (kronos.alcnet.com [63.69.28.22]) by hub.freebsd.org (Postfix) with ESMTP id 3A2D5154A7 for ; Mon, 3 Jan 2000 12:18:05 -0800 (PST) (envelope-from kbyanc@posi.net) X-Provider: ALC Communications, Inc. http://www.alcnet.com/ Received: from localhost (kbyanc@localhost) by kronos.alcnet.com (8.9.3/8.9.3/antispam) with ESMTP id PAA17118 for ; Mon, 3 Jan 2000 15:18:04 -0500 (EST) Date: Mon, 3 Jan 2000 15:18:04 -0500 (EST) From: Kelly Yancey X-Sender: kbyanc@kronos.alcnet.com To: hackers@FreeBSD.ORG Subject: Re: microtime vs getmicrotime In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 3 Jan 2000, Kelly Yancey wrote: > > Scanning through sys/kern_clock.c it looks like getmicrotime is > preferable to microtime since only getmicrotime accounts for > tco_method (set via the kern.timecounter sysctl). The same is true with > getnanotime vs nanotime, etc. > However, I've noticed a good bit of kernel code is still calling > microtime and nanotime rather than the get- versions: > Replying to myself :) Once I got some food in me, I was able to think about this a little more clearly. The best I can figure is that anything which requires accurate timing calls {micro,nano}time to actually access the timecounter and get the current time. However, any interfaces which either a) don't care how accurate the timing is or b) are just passing the information on to userland call get{micro,nano}time instead to that the kern.timecounter sysctl preference is enforced. Is this correct? Thanks, Kelly -- Kelly Yancey - kbyanc@posi.net - Richmond, VA Analyst / E-business Development, Bell Industries http://www.bellind.com/ Maintainer, BSD Driver Database http://www.posi.net/freebsd/drivers/ Coordinator, Team FreeBSD http://www.posi.net/freebsd/Team-FreeBSD/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message