summaryrefslogtreecommitdiffstats
path: root/stdlib/random.ml
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/random.ml')
-rw-r--r--stdlib/random.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/stdlib/random.ml b/stdlib/random.ml
index 33851b9b1..07b3d67bc 100644
--- a/stdlib/random.ml
+++ b/stdlib/random.ml
@@ -85,6 +85,9 @@ let full_init seed =
(Array.unsafe_get state j + Array.unsafe_get seed i)
done
+(* Low-entropy system-dependent initialisation. *)
+let self_init () = init (int_of_float (Sys.date () -. 2e9));;
+
(********************
(* Test functions. Not included in the library.