Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jan 2000 11:13:17 -0500 (EST)
From:      Kelly Yancey <kbyanc@posi.net>
To:        hackers@freebsd.org
Subject:   microtime vs getmicrotime
Message-ID:  <Pine.BSF.4.05.10001031059001.11032-100000@kronos.alcnet.com>

next in thread | raw e-mail | index | archive | help

  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




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