Future.sleep should take a float

This commit is contained in:
Simon Cruanes 2013-03-20 18:06:50 +01:00
parent 170c1031a9
commit 08d33095f6
2 changed files with 2 additions and 2 deletions

View file

@ -510,7 +510,7 @@ let spawn_process ?(pool=default_pool) ?(stdin="") ~cmd =
let sleep ?(pool=default_pool) time =
spawn ~pool
(fun () -> Unix.sleep time; ())
(fun () -> Thread.delay time; ())
module Infix = struct
let (>>=) x f = flatMap f x

View file

@ -139,7 +139,7 @@ val spawn_process : ?pool:Pool.t -> ?stdin:string -> cmd:string ->
(** Spawn a sub-process with the given command [cmd] (and possibly input);
returns a future containing (returncode, stdout, stderr) *)
val sleep : ?pool:Pool.t -> int -> unit t
val sleep : ?pool:Pool.t -> float -> unit t
(** Future that returns with success in the given amount of seconds *)
module Infix : sig