From owner-freebsd-hackers Sun Sep 30 20:35:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 7F34F37B40B for ; Sun, 30 Sep 2001 20:35:15 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f913ZEu66198; Sun, 30 Sep 2001 21:35:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id f913Z6701389; Sun, 30 Sep 2001 21:35:14 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200110010335.f913Z6701389@harmony.village.org> To: Bart Kus Subject: Re: precise timing Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> References: <200109301010.07784@EO> Date: Sun, 30 Sep 2001 21:35:06 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200109301010.07784@EO> Bart Kus writes: : Right now, I use for() as a timing loop. I calibrate it on program start : and can then get very precise timing. There are, of course, the intermittent : interruptions of the multitasker. So this solution is not ideal by any : means. In fact, the for() loop approach is really meant for the DOS port of : this software. I'm wondering if there is any way I can access a more precise : interrupt-driven (or blocking) timing source. I know I can do a select() : with supposedly microsecond accuracy, but I doubt that it is in fact that : accurate in practice (doesn't the kernel only use a 100Hz clock or : something?). Is there any way to get at the system timers on the : motherboard? Those can provide precise timing, no? you are likely better off implementing this as a device driver, likely with the parallel port bus stuff. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message