aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpc_SUITE.erl
diff options
context:
space:
mode:
authorErland Schönbeck <erland@erlang.org>2015-03-17 11:56:14 +0100
committerRickard Green <rickard@erlang.org>2015-03-20 15:28:54 +0100
commit7cdde7537deccd53d95d03860379f3d20ad2e265 (patch)
tree8d2c7cc5b86e6a57e840efcd781abe8067c9f614 /lib/inets/test/httpc_SUITE.erl
parent87ae700c7383b74b8ddade6bfe30481dcdc5b6c7 (diff)
downloadotp-7cdde7537deccd53d95d03860379f3d20ad2e265.tar.gz
otp-7cdde7537deccd53d95d03860379f3d20ad2e265.tar.bz2
otp-7cdde7537deccd53d95d03860379f3d20ad2e265.zip
inets: Cleanup of multiple copies of functions
Add inets_lib with common functions used by multiple modules
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r--lib/inets/test/httpc_SUITE.erl13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 348c75f787..79e2fbca62 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1889,7 +1889,7 @@ wait4clients(Clients, Timeout) when Timeout > 0 ->
{'DOWN', _MRef, process, Pid, normal} ->
{value, {Id, _, _}} = lists:keysearch(Pid, 2, Clients),
NewClients = lists:keydelete(Id, 1, Clients),
- wait4clients(NewClients, Timeout - millisec_passed(Time));
+ wait4clients(NewClients, Timeout - inets_lib:millisec_passed(Time));
{'DOWN', _MRef, process, Pid, Reason} ->
{value, {Id, _, _}} = lists:keysearch(Pid, 2, Clients),
ct:fail({bad_client_termination, Id, Reason})
@@ -1982,17 +1982,6 @@ parse_connection_type(Request) ->
"keep-alive" -> keep_alive
end.
-%% Help function, elapsed milliseconds since T0
-millisec_passed({_,_,_} = T0 ) ->
- %% OTP 17 and earlier
- timer:now_diff(erlang:now(), T0) div 1000;
-
-millisec_passed(T0) ->
- %% OTP 18
- erlang:convert_time_resolution(erlang:monotonic_time() - T0,
- erlang:time_resolution(),
- 1000000) div 1000.
-
set_random_seed() ->
%% Adapt to OTP 18 erlang time API and be backwards compatible
Unique = try