aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept/src/percept.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-03-16 18:36:18 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-03-16 18:45:15 +0100
commite7473f6810b249d1115361f005fb8b44fe59f474 (patch)
treeec27b307eb4cb7f8499db6ec6da99270970c8624 /lib/percept/src/percept.erl
parent5eb0a3f256d6f816ebd56ba5d991eecaf580dd88 (diff)
downloadotp-e7473f6810b249d1115361f005fb8b44fe59f474.tar.gz
otp-e7473f6810b249d1115361f005fb8b44fe59f474.tar.bz2
otp-e7473f6810b249d1115361f005fb8b44fe59f474.zip
Use monotonic_time/1 instead of now/0
Diffstat (limited to 'lib/percept/src/percept.erl')
-rw-r--r--lib/percept/src/percept.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/percept/src/percept.erl b/lib/percept/src/percept.erl
index badb3f3d66..f1a2002c9d 100644
--- a/lib/percept/src/percept.erl
+++ b/lib/percept/src/percept.erl
@@ -226,7 +226,7 @@ stop_webserver(Port) ->
parse_and_insert(Filename, DB) ->
io:format("Parsing: ~p ~n", [Filename]),
- T0 = erlang:now(),
+ T0 = erlang:monotonic_time(milli_seconds),
Pid = dbg:trace_client(file, Filename, mk_trace_parser(self())),
Ref = erlang:monitor(process, Pid),
parse_and_insert_loop(Filename, Pid, Ref, DB, T0).
@@ -239,8 +239,8 @@ parse_and_insert_loop(Filename, Pid, Ref, DB, T0) ->
{parse_complete, {Pid, Count}} ->
receive {'DOWN', Ref, process, Pid, normal} -> ok after 0 -> ok end,
DB ! {action, consolidate},
- T1 = erlang:now(),
- io:format("Parsed ~p entries in ~p s.~n", [Count, ?seconds(T1, T0)]),
+ T1 = erlang:monotonic_time(milli_seconds),
+ io:format("Parsed ~w entries in ~w ms.~n", [Count, T1 - T0]),
io:format(" ~p created processes.~n", [length(percept_db:select({information, procs}))]),
io:format(" ~p opened ports.~n", [length(percept_db:select({information, ports}))]),
ok;