diff options
author | Dan Gudmundsson <[email protected]> | 2015-01-30 15:12:07 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-03-20 15:28:53 +0100 |
commit | 4deb4dbc453318bcdf2f6f160cdb219fb31f7926 (patch) | |
tree | 1ad63eb2857f6d4cee5b4aaa63cb6ce5f2bb9706 /lib/mnesia/src/mnesia_lib.erl | |
parent | d33ac120455f520a74b3c5cdfc32136d25b3e771 (diff) | |
download | otp-4deb4dbc453318bcdf2f6f160cdb219fb31f7926.tar.gz otp-4deb4dbc453318bcdf2f6f160cdb219fb31f7926.tar.bz2 otp-4deb4dbc453318bcdf2f6f160cdb219fb31f7926.zip |
Replace usage of erlang:now() with usage of new API
Diffstat (limited to 'lib/mnesia/src/mnesia_lib.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_lib.erl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/mnesia/src/mnesia_lib.erl b/lib/mnesia/src/mnesia_lib.erl index b2103b2ef8..fc41cbedcb 100644 --- a/lib/mnesia/src/mnesia_lib.erl +++ b/lib/mnesia/src/mnesia_lib.erl @@ -930,14 +930,9 @@ random_time(Retries, _Counter0) -> case get(random_seed) of undefined -> - try - _ = random:seed(erlang:phash2([erlang:node()]), - erlang:monotonic_time(), - erlang:unique_integer()) - catch - error:_ -> - _ = random:seed(erlang:now()) - end, + _ = random:seed(erlang:unique_integer(), + erlang:monotonic_time(), + erlang:unique_integer()), Time = Dup + random:uniform(MaxIntv), %% dbg_out("---random_test rs ~w max ~w val ~w---~n", [Retries, MaxIntv, Time]), Time; |