Skip to content

Commit

Permalink
change rebar hiding of erlang:now
Browse files Browse the repository at this point in the history
  • Loading branch information
massemanet committed Feb 25, 2016
1 parent 1742031 commit cd19b86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ end,
Timestamp =
fun(CFG) ->
case erlang:is_builtin(erlang,timestamp,0) of
true -> KeyAppend(erl_opts,CFG,{d,'HAS_TIMESTAMP'},KeyAppend);
false -> CFG
false -> KeyAppend(erl_opts,CFG,{d,'USE_NOW'},KeyAppend);
true -> CFG
end
end,

Expand Down
6 changes: 3 additions & 3 deletions src/prfTime.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
-module('prfTime').
-export([ts/0]).

-ifdef(HAS_TIMESTAMP).
ts() -> erlang:timestamp().
-else.
-ifdef(USE_NOW).
ts() -> erlang:now().
-else.
ts() -> erlang:timestamp().
-endif.

0 comments on commit cd19b86

Please sign in to comment.