Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Waiting for float time
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Robert Roessler <roessler@r...>
Subject: Re: [Caml-list] Waiting for float time 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 with empty 
lists for all THREE of the descriptor lists... and this does work on 

There may be better solutions... ;)

Robert Roessler