From owner-freebsd-hackers Mon Jan 3 8:13:22 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 F26B6151A5 for ; Mon, 3 Jan 2000 08:13:18 -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 LAA11371 for ; Mon, 3 Jan 2000 11:13:17 -0500 (EST) Date: Mon, 3 Jan 2000 11:13:17 -0500 (EST) From: Kelly Yancey X-Sender: kbyanc@kronos.alcnet.com To: hackers@freebsd.org Subject: microtime vs getmicrotime 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 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: $ cd /usr/src/sys; grep -Rw microtime * | wc -l 85 $ cd /usr/src/sys; grep -Rw nanotime * | wc -l 12 $ cd /usr/src/sys; grep -Rw getmicrotime * | wc -l 39 $ cd /usr/src/sys; grep -Rw getnanotime * | wc -l 23 Is there are reason for code to still use the {micro,nano}time functions as opposed to get{micro,nano}time? I should point out that I am looking at a recently-supped 3.4 source tree. Although my friend cvsweb says that -current code is still calling {micro,nano}time also. 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