<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<dl compact="compact">
  <dt><br>
  </dt>
  <dt>Here's a POSIX implementation of a sleep function in C, as found
in the book "Advanced Programming in the UNIX Environment":<br>
    <br>
&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://www.yendor.com/programming/unix/apue/lib.svr4/sleep.c">http://www.yendor.com/programming/unix/apue/lib.svr4/sleep.c</a><br>
    <br>
AFAIK, all the GHC platforms, including Windows, are POSIX compliant.&nbsp;
You could compile this code separately and call it via the FFI.&nbsp; If it
doesn't work on Windows, you could instead call:<br>
  </dt>
</dl>
<dl compact="compact">
  <dt><tt>Win32::Sleep(TIME)</tt>&nbsp;</dt>
  <dd>
    <p class="firstline">[CORE] Pauses for TIME milliseconds. The
timeslices are made available
to other processes and threads.
    </p>
  </dd>
  <dt>Hope that helps,<br>
Lyle Kopnicky<br>
    <br>
BTW, you have a very interesting disclaimer in your message.&nbsp; I hope I
will not go to jail for reading it.<br>
  </dt>
</dl>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Ben_Yu@asc.aon.com">Ben_Yu@asc.aon.com</a> wrote:<br>
<blockquote type="cite"
 cite="midOFBA77FED4.FBE4FC84-ON86256DF6.00802FA7-86256DF6.0080EF98@COMBINED.COM">
  <pre wrap="">Hi there,

In Ghc, how do I sleep for say, 1 minute? I'm trying to write a simple file
arrival listener and could not find the sleep api. Can haskell do it at
all?

Thanks.

Ben.


This message is intended only for the addressee and may contain information
that is confidential or privileged. Unauthorized use is strictly prohibited
and may be unlawful. If you are not the intended recipient, or the person
responsible for delivering to the intended recipient, you should not read,
copy, disclose or otherwise use this message, except for the purpose of
delivery to the addressee. If you have received this email in error, please
delete and advise us immediately.


_______________________________________________
Haskell mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Haskell@haskell.org">Haskell@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/haskell">http://www.haskell.org/mailman/listinfo/haskell</a>
  </pre>
</blockquote>
</body>
</html>