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  -  [EMAIL PROTECTED]  -  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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to