From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) Newsgroups: comp.os.msdos.djgpp Subject: Re: INKEY in DJGPP? (Timed input function?) Date: 20 Jun 1997 08:44:38 GMT Organization: Oxford University, England Lines: 36 Distribution: world Message-ID: <5odftm$9mt@news.ox.ac.uk> References: <5OUMnDAOyUqzEwjg AT netbook DOT demon DOT co DOT uk> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk James MacDonald (trill AT Xnetbook DOT demon DOT co DOT uk) wrote: : Is it possible to have a three second delay in which time F1 can be : pressed (like INKEY/INKEY$ in BBC BASIC)? How about this: #include #include int inkey(int a) /* IIRC a is measured in centiseconds, so that's what I've done here */ { int start; if (a<0) return 0; /* you'd need to use Allegro or similar to do these */ else { start=clock(); while ((!kbhit())&&(clock()-start Merton College, Oxford