Ver código fonte

fixed macro Sys.sleep accuracy

Nicolas Cannasse 12 anos atrás
pai
commit
f08bb2845a
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -1586,7 +1586,7 @@ let std_lib =
 		);
 		"sys_sleep", Fun1 (fun f ->
 			match f with
-			| VFloat f -> Unix.sleep (int_of_float (ceil f)); VNull
+			| VFloat f -> ignore(Unix.select [] [] [] f); VNull
 			| _ -> error()
 		);
 		"set_time_locale", Fun1 (fun l ->