Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 2009 19:46:25 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>, svn-src-all@freebsd.org, alfred@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: svn commit: r195960 - in head/sys/dev/usb: . controller input
Message-ID:  <alpine.BSF.2.00.0908031945320.11341@fledge.watson.org>
In-Reply-To: <200908032033.08169.hselasky@c2i.net>
References:  <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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.
>
> I suggest that the DELAY(1000) is only active while a key is actually 
> pressed.
>
> See attached patch. Please test and report back.

This seems a reasonable middle ground -- avoids use of sensitive time counters 
in DDB, avoids expensive poll operation most of the time, and allows key 
repeat to work, which is especially nice for backspace in DDB. :-)

Robert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0908031945320.11341>