aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_traffic_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-03-05 01:34:08 +0100
committerAnders Svensson <[email protected]>2015-03-05 01:34:08 +0100
commit5e5b22215e3f0a60b7afc2393b3ef68892360b07 (patch)
tree1c0a2c3b66c6af9eae4ba6587b911681a075ae64 /lib/diameter/test/diameter_traffic_SUITE.erl
parenta4df8f2e68ccef9936c5b43378a006099d81f801 (diff)
parenteae8ecd1fd2ba33b1c81d0c19605047e2f317eda (diff)
downloadotp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.tar.gz
otp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.tar.bz2
otp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.zip
Merge branch 'anders/diameter/time/OTP-12439' into maint
* anders/diameter/time/OTP-12439: Use new time api in test suites Use new time api in implementation
Diffstat (limited to 'lib/diameter/test/diameter_traffic_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 03815f283e..9822b95301 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2014. 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
@@ -760,7 +760,7 @@ call(Config, Req, Opts) ->
diameter:call(?CLIENT,
dict(Req, Dict0),
msg(Req, ReqEncoding, Dict0),
- [{extra, [{Name, Group}, now()]} | Opts]).
+ [{extra, [{Name, Group}, diameter_lib:now()]} | Opts]).
origin({A,C}) ->
2*codec(A) + container(C);
@@ -1076,8 +1076,10 @@ app(Req, _, Dict0) ->
%% handle_error/6
handle_error(timeout = Reason, _Req, ?CLIENT, _Peer, _, Time) ->
- Now = now(),
- {Reason, {Time, Now, timer:now_diff(Now, Time)}};
+ Now = diameter_lib:now(),
+ {Reason, {diameter_lib:timestamp(Time),
+ diameter_lib:timestamp(Now),
+ diameter_lib:micro_diff(Now, Time)}};
handle_error(Reason, _Req, ?CLIENT, _Peer, _, _Time) ->
{error, Reason}.