Date: Tue, 31 Jul 2001 11:49:04 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Gwen cc: djgpp AT delorie DOT com Subject: Re: question about getkey() , time() and how to pick a char from the screen In-Reply-To: <01c11959$9c6f2d00$108784d5@feta> 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 Tue, 31 Jul 2001, Gwen wrote: > Here is some little questions : I suggest in the future to post each question separately. > Is there an equivalent of getkey() who doesn't wait (taking keys pressed > 'on the fly' like kbhit() ) ? You could use `bioskey' with 1 as the command. > How to use correctly time() ? I tried to make a countdown of 3 sec : > > float quantum=3; > time_t t=time(NULL); > while (time(NULL) - t < quantum) { > // display the decount to the screen by example > } > > it works, in fact it works till quantum=1, below (like quantum=0.1) it acts > as quantum=1, why ? > maybe the second is the unit of the function time() ? Yes, `time' returns a value that is the number of seconds since ``the epoch'', so its resolution is 1 second. > and my last question : How to retrieve the char displayed at a certain > position of the screen ? Try ScreenGetChar. > Is there a possibility to do that with PDcurses ? No clue, sorry. But I'd guess there is no such way.