sleep w/inkey, certain keys cause processing to pause
Kenneth Brody
kenbrody at bestweb.net
Thu Apr 14 07:48:07 PDT 2005
Quoting John Esak (Thu, 14 Apr 2005 00:30:13 -0400):
>
> 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.
[...]
The original question was on how to break out of a SLEEP. Several people,
including myself, suggested using shorter SLEEPs, along with INKEY, to be
able to cancel the sleeping.
Yes, the use of INKEY in a busy-loop is a CPU hog. However, by using it
along with SLEEP, you have eliminated that issue.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list