diff options
author | Erlang/OTP <[email protected]> | 2015-08-13 12:34:03 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2015-08-13 12:34:03 +0200 |
commit | 2c7132e3f6dc670a177aac804fe12702dbc9ed7d (patch) | |
tree | f684c2a7881b2fb3eb44312df3770432de01b86d /lib/diameter/test/diameter_util.erl | |
parent | 0c21fb612b736f53dcc04face42bd106c50287ae (diff) | |
parent | 96d63dca845e18f86488db9d8dfb33eb76ad0467 (diff) | |
download | otp-2c7132e3f6dc670a177aac804fe12702dbc9ed7d.tar.gz otp-2c7132e3f6dc670a177aac804fe12702dbc9ed7d.tar.bz2 otp-2c7132e3f6dc670a177aac804fe12702dbc9ed7d.zip |
Merge branch 'anders/diameter/17/time/OTP-12926' into maint-17
* anders/diameter/17/time/OTP-12926:
Simplify time manipulation
Remove use of monotonic time in pre-18 code
Remove unnecessary redefinition of erlang:max/2
Diffstat (limited to 'lib/diameter/test/diameter_util.erl')
-rw-r--r-- | lib/diameter/test/diameter_util.erl | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl index df7d268429..e8fab18a45 100644 --- a/lib/diameter/test/diameter_util.erl +++ b/lib/diameter/test/diameter_util.erl @@ -30,8 +30,6 @@ fold/3, foldl/3, scramble/1, - timestamp/0, - seed/0, unique_string/0, have_sctp/0]). @@ -178,7 +176,7 @@ scramble(L) -> [[fun s/1, L]]). s(L) -> - random:seed(seed()), + random:seed(now()), s([], L). s(Acc, []) -> @@ -188,19 +186,6 @@ s(Acc, L) -> s([T|Acc], H ++ Rest). %% --------------------------------------------------------------------------- -%% timestamp/0 - -timestamp() -> - diameter_lib:timestamp(diameter_lib:now()). - -%% --------------------------------------------------------------------------- -%% seed/0 - -seed() -> - {_,T} = diameter_lib:seed(), - T. - -%% --------------------------------------------------------------------------- %% unique_string/0 unique_string() -> @@ -209,7 +194,7 @@ unique_string() -> integer_to_list(N) catch error: undef -> %% OTP < 18 - {M,S,U} = timestamp(), + {M,S,U} = now(), tl(lists:append(["-" ++ integer_to_list(N) || N <- [M,S,U]])) end. |