aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_session.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-02-09 00:36:56 +0100
committerAnders Svensson <[email protected]>2015-02-20 02:26:53 +0100
commite6d19a18b7c1057c2b4493f8db822c82bb0dbe0d (patch)
tree41d01dded073f8c7722b96166e7a8a9de11f3d0f /lib/diameter/src/base/diameter_session.erl
parent5f6399fb9f5d1552bb0050b18e1c9a9085d8b5db (diff)
downloadotp-e6d19a18b7c1057c2b4493f8db822c82bb0dbe0d.tar.gz
otp-e6d19a18b7c1057c2b4493f8db822c82bb0dbe0d.tar.bz2
otp-e6d19a18b7c1057c2b4493f8db822c82bb0dbe0d.zip
Use new time api in implementation
In particular, deal with the deprecation of erlang:now/0 in OTP 18. Be backwards compatible with older releases: the new api is only used when available. The test suites have not been modified.
Diffstat (limited to 'lib/diameter/src/base/diameter_session.erl')
-rw-r--r--lib/diameter/src/base/diameter_session.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_session.erl b/lib/diameter/src/base/diameter_session.erl
index 3b236f109a..c5ea0428b5 100644
--- a/lib/diameter/src/base/diameter_session.erl
+++ b/lib/diameter/src/base/diameter_session.erl
@@ -157,8 +157,8 @@ session_id(Host) ->
%% ---------------------------------------------------------------------------
init() ->
- Now = now(),
- random:seed(Now),
+ {Now, Seed} = diameter_lib:seed(),
+ random:seed(Seed),
Time = time32(Now),
Seq = (?INT32 band (Time bsl 20)) bor (random:uniform(1 bsl 20) - 1),
ets:insert(diameter_sequence, [{origin_state_id, Time},