From fbaa0becc787e73fa539e0d497b0d74be27c9534 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 17 Dec 2014 22:18:27 +0100 Subject: Replace usage of erlang:now() with usage of new API --- lib/stdlib/doc/src/random.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/stdlib/doc/src/random.xml') diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml index e001058e19..2cc621ffc3 100644 --- a/lib/stdlib/doc/src/random.xml +++ b/lib/stdlib/doc/src/random.xml @@ -70,12 +70,11 @@

Seeds random number generation with integer values in the process dictionary, and returns the old state.

-

One way of obtaining a seed is to use the BIF now/0:

+

One easy way of obtaining a unique value to seed with is to:

- ... - {A1,A2,A3} = now(), - random:seed(A1, A2, A3), - ... + random:seed(erlang:phash2([node()]), + erlang:monotonic_time(), + erlang:unique_integer())
-- cgit v1.2.3