remove use of deprecated function erlang:now/0

This commit is contained in:
Tristan Sloughter 2015-04-23 17:56:56 -05:00
parent e07d08333a
commit 7015ba2951
2 changed files with 6 additions and 6 deletions

View file

@ -907,7 +907,7 @@ iso_test_() ->
]. ].
ms_test_() -> ms_test_() ->
Now=now(), Now=os:timestamp(),
[ [
?_assertEqual({{2012,12,12}, {12,12,12,1234}}, parse("2012-12-12T12:12:12.1234")), ?_assertEqual({{2012,12,12}, {12,12,12,1234}}, parse("2012-12-12T12:12:12.1234")),
?_assertEqual(format("H:m:s.f \\m \\i\\s \\m\\o\\n\\t\\h",?DATEMS), ?_assertEqual(format("H:m:s.f \\m \\i\\s \\m\\o\\n\\t\\h",?DATEMS),

View file

@ -174,7 +174,7 @@ real_dir_path(Path) ->
%% function of the same name. %% function of the same name.
-spec insecure_mkdtemp() -> TmpDirPath::file:name(). -spec insecure_mkdtemp() -> TmpDirPath::file:name().
insecure_mkdtemp() -> insecure_mkdtemp() ->
random:seed(now()), random:seed(os:timestamp()),
UniqueNumber = erlang:integer_to_list(erlang:trunc(random:uniform() * 1000000000000)), UniqueNumber = erlang:integer_to_list(erlang:trunc(random:uniform() * 1000000000000)),
TmpDirPath = TmpDirPath =
filename:join([tmp(), lists:flatten([".tmp_dir", UniqueNumber])]), filename:join([tmp(), lists:flatten([".tmp_dir", UniqueNumber])]),