From owner-freebsd-realtime Fri Mar 16 3:38:34 2001 Delivered-To: freebsd-realtime@freebsd.org Received: from switchlab.net (ntmail13.lightrealm.com [216.122.135.2]) by hub.freebsd.org (Postfix) with ESMTP id E347837B718 for ; Fri, 16 Mar 2001 03:38:32 -0800 (PST) (envelope-from bennylp@switchlab.net) Received: from switchlab.net ([212.113.15.130]) by switchlab.net (8.8.7/8.8.5) with ESMTP id DAA02081 for ; Fri, 16 Mar 2001 03:41:19 -0800 (PST) Message-ID: <3AB1FABF.C16A2E94@switchlab.net> Date: Fri, 16 Mar 2001 11:36:31 +0000 From: Benny Prijono X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-realtime@freebsd.org Subject: RTC questions Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-realtime@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear all, I'm working on a program which has soft-realtime requirement, that is to schedule the jobs every 20 miliseconds. But unfortunately, if I use normal usleep() + gettimeofday(), the schedule is somewhat not reliable. If I do usleep(20), I've almost always got 30 ms long sleep. I think this might have something to do with internal kernel timing precision, which if I recall correctly is 10 ms. So is there any solution to this problem? Is there any RTC api in FreeBSD, similar to /dev/rtc in Linux? (with /dev/rtc, a single program is allowed to program the RTC to any frequency between 1Hz - 16Khz. The application then can do read() to /dev/rtc, and it will block until the next RTC tick). And in general, is there any realtime works being done with FreeBSD? links? thanks, Bennylp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-realtime" in the body of the message