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 From owner-freebsd-realtime Fri Mar 16 8:40:16 2001 Delivered-To: freebsd-realtime@freebsd.org Received: from cobweb.example.org (par-ilm-dhcp1-vl131-17.cisco.com [144.254.57.148]) by hub.freebsd.org (Postfix) with SMTP id 0B28F37B718 for ; Fri, 16 Mar 2001 08:40:14 -0800 (PST) (envelope-from molter@tin.it) Received: (qmail 1837 invoked by uid 1000); 16 Mar 2001 16:40:26 -0000 Date: Fri, 16 Mar 2001 17:40:26 +0100 From: Marco Molteni To: Benny Prijono Cc: freebsd-realtime@freebsd.org Subject: Re: RTC questions Message-ID: <20010316174026.B1812@cobweb.example.org> References: <3AB1FABF.C16A2E94@switchlab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3AB1FABF.C16A2E94@switchlab.net>; from bennylp@switchlab.net on Fri, Mar 16, 2001 at 11:36:31AM +0000 Sender: owner-freebsd-realtime@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 2001-03-16 11:36, Benny Prijono wrote: [..] > Is there any RTC api in FreeBSD, similar to /dev/rtc in Linux? You may check out the Linux "emulator" port rtc-2000.09.22 Kernel module which provides /dev/rtc device support Marco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-realtime" in the body of the message