Logtalk 2.20.0 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1114 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.19.1
|
||||
Release 2.20.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.19.1
|
||||
Release 2.20.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@@ -3,14 +3,14 @@
|
||||
|
||||
|
||||
:- info([
|
||||
version is 1.1,
|
||||
version is 1.2,
|
||||
author is 'Paulo Moura',
|
||||
date is 2004/6/30,
|
||||
date is 2004/8/15,
|
||||
comment is 'Call executing time profiler.']).
|
||||
|
||||
|
||||
:- uses(time).
|
||||
:- uses(loop).
|
||||
:- uses(time, [cpu_time/1]).
|
||||
:- uses(loop, [forto/3]).
|
||||
|
||||
|
||||
:- public(timer/2).
|
||||
@@ -34,19 +34,19 @@
|
||||
|
||||
|
||||
timer(Call, Time) :-
|
||||
time::cpu_time(Start),
|
||||
cpu_time(Start),
|
||||
(call(Call) -> true; true),
|
||||
time::cpu_time(End),
|
||||
cpu_time(End),
|
||||
Time is End - Start.
|
||||
|
||||
|
||||
timer(Call, Times, Time) :-
|
||||
time::cpu_time(Start),
|
||||
loop::forto(1, Times, Call),
|
||||
time::cpu_time(End),
|
||||
time::cpu_time(Start2),
|
||||
loop::forto(1, 0, true),
|
||||
time::cpu_time(End2),
|
||||
cpu_time(Start),
|
||||
forto(1, Times, Call),
|
||||
cpu_time(End),
|
||||
cpu_time(Start2),
|
||||
forto(1, 0, true),
|
||||
cpu_time(End2),
|
||||
Overhead is End2 - Start2,
|
||||
Time is (End - Start - Overhead) / Times.
|
||||
|
||||
|
Reference in New Issue
Block a user