aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_time_test.erl
diff options
context:
space:
mode:
authorErland Schönbeck <[email protected]>2015-03-24 13:52:07 +0100
committerErland Schönbeck <[email protected]>2015-03-24 13:52:07 +0100
commite10385909c687590d6522d007bba9d72f3f5c380 (patch)
tree51227978bac92c6eb5f94c4bc20c2b9b7d1c396e /lib/inets/test/httpd_time_test.erl
parent487446e76102b27fa8df02a353c7fdeec2d091f1 (diff)
downloadotp-e10385909c687590d6522d007bba9d72f3f5c380.tar.gz
otp-e10385909c687590d6522d007bba9d72f3f5c380.tar.bz2
otp-e10385909c687590d6522d007bba9d72f3f5c380.zip
inets: Add new module inets_time_compat with new time API
The new module is backwards compatible.
Diffstat (limited to 'lib/inets/test/httpd_time_test.erl')
-rw-r--r--lib/inets/test/httpd_time_test.erl11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/inets/test/httpd_time_test.erl b/lib/inets/test/httpd_time_test.erl
index b3e6746a01..7dd61a5517 100644
--- a/lib/inets/test/httpd_time_test.erl
+++ b/lib/inets/test/httpd_time_test.erl
@@ -18,7 +18,6 @@
%%
%%
-module(httpd_time_test).
--compile([{nowarn_deprecated_function,{erlang,now,0}}]).
-export([t/3, t1/2, t2/2, t4/2]).
@@ -117,15 +116,7 @@ main(N, SocketType, Host, Port, Time)
loop(Pollers, Timeout) ->
d("loop -> entry when"
"~n Timeout: ~p", [Timeout]),
- %% Adapt to OTP 18 erlang time API and be backwards compatible
- Start = try
- erlang:monotonic_time(1000)
- catch
- error:undef ->
- %% Use Erlang system time as monotonic time
- {A,B,C} = erlang:now(),
- A*1000000000+B*1000+(C div 1000)
- end,
+ Start = inets_time_compat:monotonic_time(),
receive
{'EXIT', Pid, {poller_stat_failure, SocketType, Host, Port, Time, Reason}} ->