diff options
author | Dan Gudmundsson <[email protected]> | 2015-02-19 15:35:44 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-03-20 15:28:53 +0100 |
commit | d2c19c15b887d44b92fa36c5f49d7f2ff755f8ad (patch) | |
tree | ea16cd65612e10521b6b1402f0e6df591489b80a /lib/test_server/src/ts_install_cth.erl | |
parent | d6c23051e42928099fdcad4199bc89503ca6f2d9 (diff) | |
download | otp-d2c19c15b887d44b92fa36c5f49d7f2ff755f8ad.tar.gz otp-d2c19c15b887d44b92fa36c5f49d7f2ff755f8ad.tar.bz2 otp-d2c19c15b887d44b92fa36c5f49d7f2ff755f8ad.zip |
test_server: Replace usage of erlang:now() with usage of new API
Diffstat (limited to 'lib/test_server/src/ts_install_cth.erl')
-rw-r--r-- | lib/test_server/src/ts_install_cth.erl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/test_server/src/ts_install_cth.erl b/lib/test_server/src/ts_install_cth.erl index 7746bbed6f..3dfa6174fe 100644 --- a/lib/test_server/src/ts_install_cth.erl +++ b/lib/test_server/src/ts_install_cth.erl @@ -238,12 +238,9 @@ generate_nodenames2(0, _Hosts, Acc) -> Acc; generate_nodenames2(N, Hosts, Acc) -> Host=lists:nth((N rem (length(Hosts)))+1, Hosts), - Name=list_to_atom(temp_nodename("nod", []) ++ "@" ++ Host), + Name=list_to_atom(temp_nodename("nod") ++ "@" ++ Host), generate_nodenames2(N-1, Hosts, [Name|Acc]). -temp_nodename([], Acc) -> - lists:flatten(Acc); -temp_nodename([Chr|Base], Acc) -> - {A,B,C} = erlang:now(), - New = [Chr | integer_to_list(Chr bxor A bxor B+A bxor C+B)], - temp_nodename(Base, [New|Acc]). +temp_nodename(Base) -> + Num = erlang:unique_integer([positive]), + Base ++ integer_to_list(Num). |