From owner-freebsd-hackers Fri Nov 3 11:36:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (unknown [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 024AD37B4C5 for ; Fri, 3 Nov 2000 11:36:29 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.0/8.11.0) with ESMTP id eA3JaOn46864; Fri, 3 Nov 2000 12:36:25 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA19515; Fri, 3 Nov 2000 12:36:24 -0700 (MST) Message-Id: <200011031936.MAA19515@harmony.village.org> To: Alfred Perlstein Subject: Re: granularity of gettimeofday() Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Fri, 03 Nov 2000 10:17:25 PST." <20001103101725.K20567@fw.wintelcom.net> References: <20001103101725.K20567@fw.wintelcom.net> <920.973271386@critter> Date: Fri, 03 Nov 2000 12:36:24 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20001103101725.K20567@fw.wintelcom.net> Alfred Perlstein writes: : Gettimeofday will force a check of the system hardware, basically : you should get better than 100HZ resolution with gettimeofday. gettimeofday on many systems do this. There are other, older systems that do not have a high resolution clock to read and rely on timer interrupts to update the clock. These systems limit their gettimeofday reports to 10ms + a "uniqifier" that means two calls to gettimeofday in a row don't get the same value. On FreeBSD, we go ahead and read the timer hardware so you aren't limited to 1/HZ increments. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message