diff options
author | Rickard Green <[email protected]> | 2014-12-17 22:18:27 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2015-03-20 15:28:53 +0100 |
commit | fbaa0becc787e73fa539e0d497b0d74be27c9534 (patch) | |
tree | c89e004b5e33d51ca07635678415c8dc4e8f2f23 /lib/stdlib/src/escript.erl | |
parent | 1d9350693fe2c4d1d6b2baa504aacd070e023a1a (diff) | |
download | otp-fbaa0becc787e73fa539e0d497b0d74be27c9534.tar.gz otp-fbaa0becc787e73fa539e0d497b0d74be27c9534.tar.bz2 otp-fbaa0becc787e73fa539e0d497b0d74be27c9534.zip |
Replace usage of erlang:now() with usage of new API
Diffstat (limited to 'lib/stdlib/src/escript.erl')
-rw-r--r-- | lib/stdlib/src/escript.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl index 6bd0eb8a22..90e1f3a8d6 100644 --- a/lib/stdlib/src/escript.erl +++ b/lib/stdlib/src/escript.erl @@ -663,7 +663,8 @@ check_source(S, CheckOnly) -> end. pre_def_macros(File) -> - {MegaSecs, Secs, MicroSecs} = erlang:now(), + {MegaSecs, Secs, MicroSecs} = erlang:timestamp(), + Unique = erlang:unique_integer([positive]), Replace = fun(Char) -> case Char of $\. -> $\_; @@ -675,8 +676,9 @@ pre_def_macros(File) -> CleanBase ++ "__" ++ "escript__" ++ integer_to_list(MegaSecs) ++ "__" ++ - integer_to_list(Secs) ++ "__" ++ - integer_to_list(MicroSecs), + integer_to_list(Secs) ++ "__" ++ + integer_to_list(MicroSecs) ++ "__" ++ + integer_to_list(Unique), Module = list_to_atom(ModuleStr), PreDefMacros = [{'MODULE', Module, redefine}, {'MODULE_STRING', ModuleStr, redefine}], |