1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-11 03:45:06 -05:00
Simba/Tests/PS/colourtest.txt
Wizzup? 950bf6cfa9 Added freeze() to colour test.
Fixed a bug in cts 0, made cst 1 20% faster. Only cts 2 left to optimise.
(Can be optimised a lot!)



git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@94 3f818213-9676-44b0-a9b4-5e4c4e03d09d
2009-09-29 02:12:29 +00:00

44 lines
1.0 KiB
Plaintext

program new;
var
x,y,w,h,i,j,t,t2:integer;
begin
getclientdimensions(w,h);
writeln(inttostr(w) + ', ' + inttostr(h));
freeze();
for i := 0 to 2 do
begin
setcolortolerancespeed(i);
t := getsystemtime;
for j := 0 to 100 do
findcolortolerance(x, y, 2532562, 0, 0, w -1 , h -1, 1);
t2 := getsystemtime;
writeln('Time for 101 tries: ' + inttostr(t2 - t) + ' ms.');
writeln('That is ' + FloatToStr((t2 - t) / 101) + ' ms each.');
if findcolortolerance(x, y, 2532562, 0, 0, w-1, h-1, 1) then
begin
writeln('CTS: ' + inttostr(I) + '; Found the colour at (' + inttostr(x) + ', ' +
inttostr(y) + ')');
movemouse(x, y);
wait(1000);
end else
writeln('not found');
end;
unfreeze();
end.
Compiled succesfully in 7 ms.
826, 597
Time for 101 tries: 1143 ms.
That is 11.316831683168 ms each.
not found
Time for 101 tries: 2565 ms.
That is 25.396039603960 ms each.
not found
Time for 101 tries: 3799 ms.
That is 37.613861386139 ms each.
not found
Succesfully executed