delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/23/05:14:51

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Wed, 23 Jan 2002 12:12:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: ROLAND <roland_asmann AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: kbhit()
In-Reply-To: <20020123090154.12465.qmail@web9105.mail.yahoo.com>
Message-ID: <Pine.SUN.3.91.1020123121137.6845X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 23 Jan 2002, ROLAND wrote:

> Now I have found the error: If i call kbhit() and
> check if a key has been hit, the program freezes until
> a key has been hit!
> Can anyone tell me if there is a way to check if a key
> has been pressed once in a while (say every 10 sec's)
> and if not, then just go on executing the code???

Something is wrong with the rest of your code: kbhit() _is_ the function 
you are looking for.  It returns immediately, without waiting for a key 
to be pressed.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019