aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept/test
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/test
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/test')
-rw-r--r--lib/percept/test/percept_SUITE.erl14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/percept/test/percept_SUITE.erl b/lib/percept/test/percept_SUITE.erl
index 06d62630ba..afb8bbdd5b 100644
--- a/lib/percept/test/percept_SUITE.erl
+++ b/lib/percept/test/percept_SUITE.erl
@@ -116,11 +116,10 @@ analyze(Config) when is_list(Config) ->
Begin = processes(),
Path = ?config(data_dir, Config),
File = filename:join([Path,"profile_test.dat"]),
- T0 = erlang:now(),
+ T0 = erlang:monotonic_time(milli_seconds),
?line ok = percept:analyze(File),
- T1 = erlang:now(),
- Secs = timer:now_diff(T1,T0)/1000000,
- io:format("percept:analyze/1 took ~.2f s.~n", [Secs]),
+ T1 = erlang:monotonic_time(milli_seconds),
+ io:format("percept:analyze/1 took ~w ms.~n", [T1 - T0]),
?line {stopped, _} = percept_db:stop(),
print_remainers(remainers(Begin, processes())),
ok.
@@ -133,11 +132,10 @@ analyze_dist(Config) when is_list(Config) ->
Begin = processes(),
Path = ?config(data_dir, Config),
File = filename:join([Path,"ipc-dist.dat"]),
- T0 = erlang:now(),
+ T0 = erlang:monotonic_time(milli_seconds),
?line ok = percept:analyze(File),
- T1 = erlang:now(),
- Secs = timer:now_diff(T1,T0)/1000000,
- io:format("percept:analyze/1 took ~.2f s.~n", [Secs]),
+ T1 = erlang:monotonic_time(milli_seconds),
+ io:format("percept:analyze/1 took ~w ms.~n", [T1 - T0]),
?line {stopped, _} = percept_db:stop(),
print_remainers(remainers(Begin, processes())),
ok.