Hi polifemo,

> I have a loop that executes a prg and then waits for the user to input
> something. If the user does not input anything within the timeout, the
> waiting is aborted and the loop restarts.
> The problem is that, I want the timeout to be much faster, but 'abort only
> works in seconds. Is there a way to abort a program after M milliseconds?

Your question can be interpreted in two ways:

1. The program really just waits for user input.

   If this input can be handled on the keystroke level, you can call (key 100)
   to wait for 100 ms.

2. The loop is doing something and you want to interrupt that

   Then you can either use (poll 0) to check standard input in the loop,
   or install a signal handler like *Sig1 and do a (throw ...) in it.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to