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 X-Sender: eliz AT is To: ROLAND cc: djgpp AT delorie DOT com Subject: Re: kbhit() In-Reply-To: <20020123090154.12465.qmail@web9105.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.