diff --git a/ocaml/xe-cli/newcli.ml b/ocaml/xe-cli/newcli.ml index 04d4faa2921..0e75dbbc877 100644 --- a/ocaml/xe-cli/newcli.ml +++ b/ocaml/xe-cli/newcli.ml @@ -633,7 +633,7 @@ let main_loop ifd ofd permitted_filenames = with | Unix.Unix_error (_, _, _) when !delay <= long_connection_retry_timeout -> - Thread.delay !delay ; + Unix.sleepf !delay ; delay := !delay *. 2. ; keep_connection () | e -> diff --git a/ocaml/xenopsd/cli/xn.ml b/ocaml/xenopsd/cli/xn.ml index 177d9dadd36..74ade92f21e 100644 --- a/ocaml/xenopsd/cli/xn.ml +++ b/ocaml/xenopsd/cli/xn.ml @@ -1047,7 +1047,7 @@ let raw_console_proxy sockaddr = (fun () -> Unix.close s) with | Unix.Unix_error (_, _, _) when !delay <= long_connection_retry_timeout -> - Thread.delay !delay ; + Unix.sleepf !delay ; delay := !delay *. 2. ; keep_connection () | e -> diff --git a/ocaml/xenopsd/xc/memory_breakdown.ml b/ocaml/xenopsd/xc/memory_breakdown.ml index ef676f7b4d0..f11bc6384e2 100644 --- a/ocaml/xenopsd/xc/memory_breakdown.ml +++ b/ocaml/xenopsd/xc/memory_breakdown.ml @@ -246,7 +246,7 @@ let print_memory_field_values xc xs = flush stdout (** Sleeps for the given time period in seconds. *) -let sleep time_period_seconds = Thread.delay time_period_seconds +let sleep time_period_seconds = Unix.sleepf time_period_seconds (** Prints a header line of memory field names, and then periodically prints a line of memory field values. *) diff --git a/ocaml/xenopsd/xc/memory_summary.ml b/ocaml/xenopsd/xc/memory_summary.ml index ff2560f8154..c63e495ccb4 100644 --- a/ocaml/xenopsd/xc/memory_summary.ml +++ b/ocaml/xenopsd/xc/memory_summary.ml @@ -36,7 +36,7 @@ let _ = let finished = ref false in while not !finished do finished := !delay < 0. ; - if !delay > 0. then Thread.delay !delay ; + if !delay > 0. then Unix.sleepf !delay ; flush stdout ; let physinfo = Xenctrl.physinfo xc in let one_page = 4096L in