diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1999-07-22 13:00:59 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1999-07-22 13:00:59 +0000 |
commit | 8a8a0c17ae03cf025411f33f40ac3bf6a588b1c3 (patch) | |
tree | cb247de6d002e787ff2d0b8506c2ef31b11a5a90 /stdlib/random.ml | |
parent | 8d6245cdbedf4528cab4ff7c46b3ab37c11b0b4a (diff) |
ajout de Random.self_init et Sys.date. Attention bootstrap difficile.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/random.ml')
-rw-r--r-- | stdlib/random.ml | 3 |
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. |