sleep w/inkey, certain keys cause processing to pause

Jay R. Ashworth jra at baylink.com
Thu Apr 14 05:49:18 PDT 2005


On Thu, Apr 14, 2005 at 12:30:13AM -0400, John Esak wrote:
> I see you are talking about INKEY.  I don't know why you decided to use this
> function, but it is my understanding that it is extremely CPU dependent.
> Meaning, you will bring your system to a crawl while using it. That is why
> WAITKEY was invneted... Again, it is my understanding that INKEY only has
> very limited usage possibilities because it is so tightly CPU bound. I would
> avoid it... but perhaps, Ken can clarify further.

He's using it cause Ken told him to, John.  :-)

Waitkey will only return when you *hit a key*.  He needs to return
either when a key is pressed *or* on a timeout, and building your own
loop with inkey does seem to be the only solution to that.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

      If you can read this... thank a system administrator.  Or two.  --me


More information about the Filepro-list mailing list