aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 66781d7b06..009a766e43 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -124,8 +124,7 @@ i({Ack, T, Pid, {RecvData,
= Svc}}) ->
monitor(process, Pid),
wait(Ack, Pid),
- {_, Seed} = diameter_lib:seed(),
- random:seed(Seed),
+ random:seed(now()),
putr(restart, {T, Opts, Svc, SvcOpts}), %% save seeing it in trace
putr(dwr, dwr(Caps)), %%
{_,_} = Mask = proplists:get_value(sequence, SvcOpts),
@@ -453,7 +452,7 @@ transition({timeout, TRef, tw}, #watchdog{tref = TRef} = S) ->
%% Message has arrived since the timer was started: subtract time
%% already elapsed from new timer.
transition({timeout, _, tw}, #watchdog{tref = T0} = S) ->
- set_watchdog(diameter_lib:micro_diff(T0) div 1000, S);
+ set_watchdog(timer:now_diff(now(), T0) div 1000, S);
%% State query.
transition({state, Pid}, #watchdog{status = S}) ->
@@ -535,7 +534,7 @@ set_watchdog(#watchdog{tref = undefined} = S) ->
%% Timer already set: start at new one only at expiry.
set_watchdog(#watchdog{} = S) ->
- S#watchdog{tref = diameter_lib:now()};
+ S#watchdog{tref = now()};
set_watchdog(stop = No) ->
No.