From owner-freebsd-hackers Sun Sep 30 18:13:23 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id C159E37B405 for ; Sun, 30 Sep 2001 18:13:13 -0700 (PDT) Received: from cain.gsoft.com.au (root@spare0.gsoft.com.au [203.38.152.114]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id KAA24284; Mon, 1 Oct 2001 10:42:58 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.5.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200109301010.07784@EO> Date: Mon, 01 Oct 2001 10:42:57 +0930 (CST) From: "Daniel O'Connor" To: Bart Kus Subject: RE: precise timing Cc: hackers@freebsd.org 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 On 30-Sep-2001 Bart Kus wrote: > 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? I suspect the only way you could achieve this in FreeBSD at the moment is to write a kernel driver. That way you can disable interrupts while you frob your board.. (And get quick access when you need it). --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message