From owner-freebsd-hackers Thu Nov 2 9:56:10 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 6275437B479 for ; Thu, 2 Nov 2000 09:56:07 -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 eA2Hu0n39554; Thu, 2 Nov 2000 10:56:01 -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 KAA09361; Thu, 2 Nov 2000 10:55:56 -0700 (MST) Message-Id: <200011021755.KAA09361@harmony.village.org> To: Poul-Henning Kamp Subject: Re: AW: AW: Accessing the tty structure of an opened device Cc: Alexander Maret , "'freebsd-hackers@freebsd.org'" In-reply-to: Your message of "Fri, 27 Oct 2000 15:08:34 +0200." <10553.972652114@critter> References: <10553.972652114@critter> Date: Thu, 02 Nov 2000 10:55:55 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <10553.972652114@critter> Poul-Henning Kamp writes: : >the time between a pulse and a space often only takes : >a few milliseconds. I have to meassure that with : >gettimeofday(). : : You will need to do this in a device driver, there is no way you : can reliably measure that from userland. : : Trust me on this: I've tried. We at timing solutions had a heck of a time measuring timing things in userland and it became very easy to do it in kernel land. We used the parallel port to measure out pulses, but the same pps api that Poul should work for the serial port as well. And the advantage of the pps api is that it queues up events (iirc) and counts them so you know if the buffer overflowed and you missed any. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message