From owner-freebsd-hackers Tue Apr 18 01:09:51 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA21923 for hackers-outgoing; Tue, 18 Apr 1995 01:09:51 -0700 Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA21903 for ; Tue, 18 Apr 1995 01:09:44 -0700 Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id JAA13088; Tue, 18 Apr 1995 09:57:02 +0200 From: Luigi Rizzo Message-Id: <199504180757.JAA13088@labinfo.iet.unipi.it> Subject: Re: help with timeouts To: julian@ref.tfs.com (Julian Elischer) Date: Tue, 18 Apr 1995 09:57:01 +0200 (MET DST) Cc: chitra@CS.SunySB.EDU, freebsd-hackers@FreeBSD.org In-Reply-To: <199504180639.XAA02115@ref.tfs.com> from "Julian Elischer" at Apr 17, 95 11:38:41 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1245 Sender: hackers-owner@FreeBSD.org Precedence: bulk > > Hi! > > I am developing a token bus protocol in the FreeBSD network > > interrupt handler. For the > > token recovery algorithm that I have, I need to set microsecond > > timeouts (they could be off by upto 500 u_sec and still serve my purpose). > > As things are now, I can only set timeouts in multiples of 10 millisec. > > Can you please tell me how I can implement u_sec timeouts ? > > Any help will be much appreciated. > > There is already code that 'turns up' the system clock frequency > (I believe the pc-audio code to be exact) to (I think) 10KHz > so you could do similar and get 100uSec time, pcaudio runs at 16 KHz, I think. This means one interrupt every 62.5 uS; this is *not* something you want to run continuously on your system: the overhead is high, some interrupts are missed, even on my 486/66, and you see you clock slowing down (due to the missed interrupts). Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 ====================================================================