diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2019-04-16 11:20:55 +0200 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2019-04-16 11:20:55 +0200 |
commit | 4e2c95fe58d6451af1e5d7455c2499c992fa558f (patch) | |
tree | c931a7f9b7cff0812144744ab1c3315f99049734 | |
parent | Handle cdata in initial data probe of ws module (diff) |
Change implementation of misc:unique_timestamp()
-rw-r--r-- | src/misc.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/misc.erl b/src/misc.erl index c646ed442..73d05ff24 100644 --- a/src/misc.erl +++ b/src/misc.erl @@ -483,6 +483,5 @@ get_dir(Type) -> %% Generates erlang:timestamp() that is guaranteed to unique -spec unique_timestamp() -> erlang:timestamp(). unique_timestamp() -> - Time = erlang:system_time(microsecond), - UI = erlang:unique_integer([positive, monotonic]), - usec_to_now(Time + UI). + {MS, S, _} = erlang:timestamp(), + {MS, S, erlang:unique_integer([positive, monotonic]) rem 1000000}. |