aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.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/src/base/diameter_service.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/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index e1cc7bdfc9..04401a3d87 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -24,6 +24,9 @@
-module(diameter_service).
-behaviour(gen_server).
+-compile({no_auto_import, [now/0]}).
+-import(diameter_lib, [now/0]).
+
%% towards diameter_service_sup
-export([start_link/1]).
@@ -1197,7 +1200,7 @@ connect_timer(Opts, Def0) ->
%% continuous restarted in case of faulty config or other problems.
tc(Time, Tc) ->
choose(Tc > ?RESTART_TC
- orelse timer:now_diff(now(), Time) > 1000*?RESTART_TC,
+ orelse diameter_lib:micro_diff(Time) > 1000*?RESTART_TC,
Tc,
?RESTART_TC).