Updated usage of time functions (removed usage of deprecated erlang:now())
authorav <av@fun-box.ru>
Wed, 27 Jul 2016 13:45:12 +0000 (16:45 +0300)
committerav <av@fun-box.ru>
Wed, 27 Jul 2016 13:45:12 +0000 (16:45 +0300)
src/hyper.erl

index f280a8c..e7c80f2 100644 (file)
@@ -285,7 +285,9 @@ run_report(P, Card, Repetitions) ->
                           fun (I) ->
                                   io:format("~p values with p=~p, rep ~p~n",
                                             [Card, P, I]),
-                                  random:seed(erlang:now()),
+                                  random:seed(erlang:phash2([node()]),
+                                              erlang:monotonic_time(),
+                                              erlang:unique_integer()),
                                   Elements = generate_unique(Card),
                                   Estimate = card(insert_many(Elements, new(P))),
                                   abs(Card - Estimate) / Card