Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2001 08:53:38 -0600
From:      Charles Randall <crandall@matchlogic.com>
To:        'Poul-Henning Kamp' <phk@critter.freebsd.dk>, Dave Leimbach <dleimbac@MPI-Softtech.Com>
Cc:        tlambert2@mindspring.com, eischen@vigrid.com, dillon@earth.backplane.com, dleimbac@earthlink.net, freebsd-questions@FreeBSD.ORG, arch@FreeBSD.ORG
Subject:   RE: Gettimeofday Again... 
Message-ID:  <5FE9B713CCCDD311A03400508B8B30130828ED85@bdr-xcln.corp.matchlogic.com>

next in thread | raw e-mail | index | archive | help
Isn't that what kern.timecounter.method (documented in the microtime() man
page) is for? That manual page states that this can be toggled.

Charles

-----Original Message-----
From: Poul-Henning Kamp [mailto:phk@critter.freebsd.dk]
Sent: Tuesday, May 15, 2001 8:11 AM
To: Dave Leimbach
Cc: tlambert2@mindspring.com; eischen@vigrid.com;
dillon@earth.backplane.com; dleimbac@earthlink.net;
freebsd-questions@FreeBSD.ORG; arch@FreeBSD.ORG
Subject: Re: Gettimeofday Again... 


In message <200105151353.IAA27481@MPI-Softtech.Com>, Dave Leimbach writes:
>Thanks for all of the great answers...
>
>For now if I want to see better performance of the timing code I can just 
>"sysctl -w kern.timecounter.hardware=TSC"??

You can try it, but depending on a lot of stuff it may not A) work nor
B) be a good idea if it does.

If you want a faster (but less exact!) gettimeofday, change the
call to microtime() to getmicrotime() in the gettimeofday() in
kern_time.c

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5FE9B713CCCDD311A03400508B8B30130828ED85>