aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_gen_sctp_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-02-10 08:44:35 +0100
committerAnders Svensson <[email protected]>2015-02-20 02:26:53 +0100
commiteae8ecd1fd2ba33b1c81d0c19605047e2f317eda (patch)
treec6dacca281e305e441a23b2fda3859cd5a623877 /lib/diameter/test/diameter_gen_sctp_SUITE.erl
parente6d19a18b7c1057c2b4493f8db822c82bb0dbe0d (diff)
downloadotp-eae8ecd1fd2ba33b1c81d0c19605047e2f317eda.tar.gz
otp-eae8ecd1fd2ba33b1c81d0c19605047e2f317eda.tar.bz2
otp-eae8ecd1fd2ba33b1c81d0c19605047e2f317eda.zip
Use new time api in test suites
Where it's less important to do so, but it has to be done at some point since erlang:now/0 is deprecated. As in the parent commit, continue to use the old api if the new one is unavailable.
Diffstat (limited to 'lib/diameter/test/diameter_gen_sctp_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_gen_sctp_SUITE.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/diameter/test/diameter_gen_sctp_SUITE.erl b/lib/diameter/test/diameter_gen_sctp_SUITE.erl
index 51ccb1e6ec..1e2baa79b3 100644
--- a/lib/diameter/test/diameter_gen_sctp_SUITE.erl
+++ b/lib/diameter/test/diameter_gen_sctp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. 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
@@ -301,11 +301,12 @@ connect2(Pid, PortNr, Bin) ->
%% T2 = time after listening process received our message
%% T3 = time after reply is received
- T1 = now(),
+ T1 = diameter_util:timestamp(),
ok = send(Sock, Id, Bin),
T2 = unmark(recv(Sock, Id)),
- T3 = now(),
- {timer:now_diff(T2, T1), timer:now_diff(T3, T2)}. %% {Outbound, Inbound}
+ T3 = diameter_util:timestamp(),
+ {diameter_lib:micro_diff(T2, T1), %% Outbound
+ diameter_lib:micro_diff(T3, T2)}. %% Inbound
%% recv/2
@@ -325,7 +326,7 @@ send(Sock, Id, Bin) ->
%% mark/1
mark(Bin) ->
- Info = term_to_binary(now()),
+ Info = term_to_binary(diameter_util:timestamp()),
<<Info/binary, Bin/binary>>.
%% unmark/1