Mail Archives: djgpp/2001/07/31/04:48:29
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.
- Raw text -