diff options
author | Erland Schönbeck <[email protected]> | 2015-03-25 12:55:19 +0100 |
---|---|---|
committer | Erland Schönbeck <[email protected]> | 2015-03-25 12:55:19 +0100 |
commit | d6797e9a34df677e82db5ee8b8388fbdf57f09f5 (patch) | |
tree | 1229a0acce281d4185d1ffcea44569947c31009c /lib/inets/examples/httpd_load_test | |
parent | a206e66f13471cdad02a966fcb569673e0938fa4 (diff) | |
parent | e10385909c687590d6522d007bba9d72f3f5c380 (diff) | |
download | otp-d6797e9a34df677e82db5ee8b8388fbdf57f09f5.tar.gz otp-d6797e9a34df677e82db5ee8b8388fbdf57f09f5.tar.bz2 otp-d6797e9a34df677e82db5ee8b8388fbdf57f09f5.zip |
Merge branch 'erland/OTP18/inets/time_api/OTP-12441'
* erland/OTP18/inets/time_api/OTP-12441:
inets: Add new module inets_time_compat with new time API The new module is backwards compatible.
Diffstat (limited to 'lib/inets/examples/httpd_load_test')
-rw-r--r-- | lib/inets/examples/httpd_load_test/hdlt_random_html.erl | 14 |
1 files changed, 4 insertions, 10 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 c55de628c1..59073a3d23 100644 --- a/lib/inets/examples/httpd_load_test/hdlt_random_html.erl +++ b/lib/inets/examples/httpd_load_test/hdlt_random_html.erl @@ -19,7 +19,6 @@ %% -module(hdlt_random_html). --compile([{nowarn_deprecated_function,{erlang,now,0}}]). -export([page/3]). page(SessionID, _Env, Input) -> @@ -49,15 +48,10 @@ stop() -> ". content(WorkSim, SzSim) -> - %% Adapt to OTP 18 erlang time API and be backwards compatible - {A, B, C} = try - {erlang:phash2([node()]), - erlang:monotonic_time(), - erlang:unique_integer()} - catch - error:undef -> - erlang:now() - end, + {A, B, C} = {erlang:phash2([node()]), + inets_time_compat:monotonic_time(), + inets_time_compat:unique_integer()}, + random:seed(A, B, C), lists:sort([random:uniform(X) || X <- lists:seq(1, WorkSim)]), lists:flatten(lists:duplicate(SzSim, "Dummy data ")). |