Author: Martin Giepmans
Date: 11:45:38 09/24/04
In my Delphi engine I have a thread that polls input when the engine is
connected to WinBoard.
Now it turns out that it steals time when it plays another engine under WinBoard
with pondering off.
According to TaskInfo it still claims about half of the processor time when the
other engine is thinking.
I have tried sleep() but it doesn't work, perhaps because I don't use sleep() in
the right way.
Does anybody know how to solve this problem in Delphi?
My polling routine looks like this (I left out what is not relevant):
procedure Tconindraad.Execute;
var c:char; buffer:string;
begin buffer:='';
repeat
if conintekst='' then
begin read(input,c);
if c=#10 then
begin if buffer<>'' then conintekst:=buffer;
buffer:=''
end
else buffer:=buffer+c
end
until terminated
end;
(The content of buffer is passed to conintekst. The engine reads conintekst
and sets it to '', so that the polling routine knows that the engine is
ready for the next input)
Martin
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.