From: Robert Roessler <roessler@rftp.com>
To: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Waiting for float time
Date: Wed, 27 Jun 2007 15:21:13 -0700 [thread overview]
Message-ID: <4682E2D9.4050207@rftp.com> (raw)
In-Reply-To: <4682DCDF.5000301@crans.org>
sayan@crans.org wrote:
> I am looking for a floating point version of the function Unix.sleep in
> order to suspend execution of a program for 0.7s
>
> Is there any such function in the standard library ?
>
> Is there a solution outside of Threads, and GTK ?
>
> I have looked at Unix.interval_timer but I'd rather not use it. From
> what I understand, you have to add a signal handler to catch sigalrm,
> and I do not see how to create a sleep function using it.
>
> Is there a multiplatform solution ?
I believe the OCaml idiom for this is to use Unix.select with empty
lists for all THREE of the descriptor lists... and this does work on
Windows.
There may be better solutions... ;)
Robert Roessler
roessler@rftp.com
http://www.rftp.com
next prev parent reply other threads:[~2007-06-27 22:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 21:55 sayan
2007-06-27 22:11 ` [Caml-list] " Karl Zilles
2007-06-28 11:15 ` Matthieu Dubuget
2007-06-28 15:03 ` Bruno Verlyck, Bruno.Verlyck
2007-06-28 15:29 ` Matthieu Dubuget
2007-06-28 15:57 ` Bruno Verlyck, Bruno.Verlyck
2007-06-27 22:21 ` Robert Roessler [this message]
2007-06-28 10:15 ` sayan
2007-06-28 10:18 ` Vincent Hanquez
2007-06-28 11:18 ` Bünzli Daniel
2007-06-28 11:33 ` Yaron Minsky
2007-06-29 10:17 ` Robert Roessler
2007-06-28 12:50 ` Thomas Fischbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4682E2D9.4050207@rftp.com \
--to=roessler@rftp.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox