From: dstein64
Subject: Pause
Date: 
Message-ID: <1e737e47-12ea-4d4f-bda6-677a4d022b78@13g2000hsb.googlegroups.com>
Is there any Lisp function that can pause a Lisp program's execution
for a few seconds, maybe something like (pause 5), which would cause
the program to pause for 5 seconds. I am writing a program that uses a
socket stream to input/output data. After outputting to the stream, it
takes a few seconds before there is anything to read from the stream.
I might be able to use threads or something else, but a pause function
would be great. Thanks.

From: Jeff
Subject: Re: Pause
Date: 
Message-ID: <f8d5bc97-fa28-4be6-b97e-6f8e4eb9c74f@a22g2000hsc.googlegroups.com>
On Apr 4, 6:35 pm, dstein64 <········@gmail.com> wrote:
> Is there any Lisp function that can pause a Lisp program's execution
> for a few seconds, maybe something like (pause 5), which would cause
> the program to pause for 5 seconds. I am writing a program that uses a
> socket stream to input/output data. After outputting to the stream, it
> takes a few seconds before there is anything to read from the stream.
> I might be able to use threads or something else, but a pause function
> would be great. Thanks.

(sleep seconds)

http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node232.html
From: Lars Rune Nøstdal
Subject: Re: Pause
Date: 
Message-ID: <47f6bc77$0$28884$c83e3ef6@nn1-read.tele2.net>
dstein64 wrote:
> Is there any Lisp function that can pause a Lisp program's execution
> for a few seconds, maybe something like (pause 5), which would cause
> the program to pause for 5 seconds. I am writing a program that uses a
> socket stream to input/output data. After outputting to the stream, it
> takes a few seconds before there is anything to read from the stream.
> I might be able to use threads or something else, but a pause function
> would be great. Thanks.

http://www.lisp.org/HyperSpec/Body/fun_sleep.html

-- 
Lars Rune N�stdal
http://nostdal.org/
From: Alex Mizrahi
Subject: Re: Pause
Date: 
Message-ID: <47f74df9$0$90268$14726298@news.sunsite.dk>
 d> socket stream to input/output data. After outputting to the stream, it
 d> takes a few seconds before there is anything to read from the stream.
 d> I might be able to use threads or something else, but a pause function
 d> would be great. Thanks.

it's better not to depend on particular timing -- this can cause problems if 
it goes not as expected.
but good news you don't need to use threads or something else -- normal read 
should wait until data arrives, it's called "blocking read".
maybe just lisp you're using is broken? or you're using non-blocking 
functions, like read-char-no-hang?

if you'll take a look on this examples for CLISP 
http://clisp.cons.org/impnotes/socket.html
you can see there is no pauses, no threads or anything else -- they just 
call read-line, and it works.