From owner-svn-src-all@FreeBSD.ORG Tue Aug 4 08:55:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AB1106566B; Tue, 4 Aug 2009 08:55:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id C38AF8FC18; Tue, 4 Aug 2009 08:55:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-149-212.carlnfd1.nsw.optusnet.com.au [122.106.149.212]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n748tF5P012200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Aug 2009 18:55:16 +1000 Date: Tue, 4 Aug 2009 18:55:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky In-Reply-To: <200908032033.08169.hselasky@c2i.net> Message-ID: <20090804183824.J928@besplex.bde.org> References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 08:55:27 -0000 On Mon, 3 Aug 2009, Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >> >> DELAY(1) is somewhet usable. > > I think DELAY(1) is not accurate enough. Indeed. But DELAY(10) is probably accurate enough, and certainly efficient enough (though ugly) since the atkbd device has used DELAY(7) and DELAY(20) for a long time without anyone noticing this slowing down disk i/o. It would take about 100 active console input drivers doing DELAY(10)'s to accumulate a delay of 1 mS. > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. Better. Bruce