Better for for checkcontrolmessage, based on Mattias Gaertner tip

git-svn-id: trunk@9268 -
This commit is contained in:
michael 2007-11-17 12:47:12 +00:00
parent efdddfd82c
commit a8eb62ff54
2 changed files with 2 additions and 3 deletions

View File

@ -1137,10 +1137,7 @@ begin
if not FDaemon.Execute then
begin
While Not Terminated do
begin
CheckControlMessage(True);
Sleep(50);
end;
CheckControlMessage(False);
end;
end;

View File

@ -112,6 +112,8 @@ end;
procedure TDaemonThread.CheckControlMessage(WaitForMessage : Boolean);
begin
If WaitForMessage then // Don't hog CPU.
Sleep(50);
end;