diff options
| author | Linus Nordberg <linus@nordu.net> | 2016-08-18 14:33:44 +0200 | 
|---|---|---|
| committer | Linus Nordberg <linus@nordu.net> | 2016-08-18 14:46:39 +0200 | 
| commit | fadbdedabbc5b8c82f388ffa799a0e2c4958cf10 (patch) | |
| tree | d2b0e88f23abff4fbc8a623499903399bacd43d8 | |
| parent | df7057d61636d826f44cee4052e45d7eda7b3692 (diff) | |
Use erlang:timestamp/0 instead of deprecated now/0.
| -rw-r--r-- | src/plop.erl | 2 | ||||
| -rw-r--r-- | src/util.erl | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/src/plop.erl b/src/plop.erl index 8bde3db..c5c83bb 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -370,7 +370,7 @@ signature_alg_type(ecdsa) -> 3.  -spec generate_timestamp() -> integer().  generate_timestamp() -> -    {NowMegaSec, NowSec, NowMicroSec} = now(), +    {NowMegaSec, NowSec, NowMicroSec} = erlang:timestamp(),      trunc(NowMegaSec * 1.0e9            + NowSec * 1.0e3            + NowMicroSec / 1.0e3). diff --git a/src/util.erl b/src/util.erl index f58cb4b..ac50eec 100644 --- a/src/util.erl +++ b/src/util.erl @@ -10,7 +10,7 @@  -spec tempfilename(string()) -> string().  tempfilename(Base) -> -    {MegaSecs, Secs, MicroSecs} = now(), +    {MegaSecs, Secs, MicroSecs} = erlang:timestamp(),      Filename = io_lib:format("~s-~s-~p.~p", [Base, os:getpid(),  			     MegaSecs * 1000000 + Secs, MicroSecs]),      Filename. | 
