aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/examples
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inets/examples')
-rw-r--r--lib/inets/examples/httpd_load_test/hdlt_random_html.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/inets/examples/httpd_load_test/hdlt_random_html.erl b/lib/inets/examples/httpd_load_test/hdlt_random_html.erl
index e3a572c61f..0024284054 100644
--- a/lib/inets/examples/httpd_load_test/hdlt_random_html.erl
+++ b/lib/inets/examples/httpd_load_test/hdlt_random_html.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -48,7 +48,15 @@ stop() ->
".
content(WorkSim, SzSim) ->
- {A, B, C} = now(),
+ %% Adapt to OTP 18 erlang time API and be back-compatible
+ {A, B, C} = try
+ {erlang:phash2([node()]),
+ erlang:monotonic_time(),
+ erlang:unique_integer()}
+ catch
+ error:undef ->
+ erlang:now()
+ end,
random:seed(A, B, C),
lists:sort([random:uniform(X) || X <- lists:seq(1, WorkSim)]),
lists:flatten(lists:duplicate(SzSim, "Dummy data ")).