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.hsela...@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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to