Subject: Re: cost of gettimeofday()
To: None <current-users@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: current-users
Date: 03/08/2002 12:28:39
In message <Pine.WNT.4.43.0203081304270.1200-100000@todd>, Todd Vierling writes
:
>On Fri, 8 Mar 2002, Peter Seebach wrote:
>
>: >Well, not gettimeofday() per se, but getting the system tick clock as a
>: >rolling timestamp each time an event fires should be fine, IMHO....
>:
>: Fair enough.  What's the canonical way to do this?
>
>microtime(9).

I'll see if this works.  A long discussion with a really confused guy at
belkin, and an experiment under windows, suggests that they're doing exactly
that; you switch away, and when you come back, they check to see if you're
doing something surprising.

I'll run a test kernel that just prints diffs (in usec), and see if I can get
a feel for a "reasonable" range.

-s