Re: How to sleep?

From: Grant Edwards <>
Date: Thu, 29 Sep 1994 00:29:21 -0500 (CDT)

David Fox writes:
> Grant Edwards writes:
> > How do I do the equivalent of the unix system call sleep(howManySeconds)?
> I'm guessing, so I can be corrected, but how about
> (define (sleep seconds)
> (system (string-append "sleep ") (number->string seconds)))

I thought about that, but it seems a tad wasteful to fork a process
and load a shell just to sleep for a second or two. I ended up just
waiting for the user to click a button to continue rather than waiting
for a fixed amount of time.

> What I've been wondering is where is the tcl "exec" function is,
> the one that returns a command's output in a string. I wrote
> a replacement that uses a temporary file, but is there something
> I'm missing something?

Grant Edwards
Rosemount Inc.
Received on Thu Sep 29 1994 - 06:55:52 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST