aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/tools/hipe_timer.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hipe/tools/hipe_timer.erl')
-rw-r--r--lib/hipe/tools/hipe_timer.erl13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/hipe/tools/hipe_timer.erl b/lib/hipe/tools/hipe_timer.erl
index 72aa25d440..13dbeb6f87 100644
--- a/lib/hipe/tools/hipe_timer.erl
+++ b/lib/hipe/tools/hipe_timer.erl
@@ -1,9 +1,5 @@
%% -*- erlang-indent-level: 2 -*-
%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2016. All Rights Reserved.
-%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
@@ -15,12 +11,9 @@
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
-%%
-%% %CopyrightEnd%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright (c) 2001 by Erik Johansson. All Rights Reserved
-%% Time-stamp: <2008-04-20 14:53:36 richard>
%% ====================================================================
%% Module : hipe_timer
%% Purpose :
@@ -51,7 +44,7 @@ empty_time() ->
{A,_} = erlang:statistics(runtime),
WTB = erlang:monotonic_time(),
{B,_} = erlang:statistics(runtime),
- {(WTB-WTA)/erlang:convert_time_unit(1, seconds, native),B-A}.
+ {(WTB-WTA)/erlang:convert_time_unit(1, second, native),B-A}.
time(F) ->
WTA = erlang:monotonic_time(),
@@ -59,7 +52,7 @@ time(F) ->
F(),
WTB = erlang:monotonic_time(),
{B,_} = erlang:statistics(runtime),
- {(WTB-WTA)/erlang:convert_time_unit(1, seconds, native),B-A}.
+ {(WTB-WTA)/erlang:convert_time_unit(1, second, native),B-A}.
timer(F) ->
WTA = erlang:monotonic_time(),
@@ -67,7 +60,7 @@ timer(F) ->
R = F(),
WTB = erlang:monotonic_time(),
{B,_} = erlang:statistics(runtime),
- {R,{(WTB-WTA)/erlang:convert_time_unit(1, seconds, native),B-A}}.
+ {R,{(WTB-WTA)/erlang:convert_time_unit(1, second, native),B-A}}.
advanced(_Fun, I) when I < 2 -> false;
advanced(Fun, Iterations) ->