const
CThreadPauseTime = 10;
...
procedure TLeonSuRockeyThread.Execute;
begin
while (not Terminated) do
begin
if FPaused then
begin
Sleep(CThreadPauseTime * 1000);
end;
FTime := (GetTickCount - FStartTime) div 1000;
if FTime >= CThreadPauseTime then
begin
FStartTime := GetTickCount;
Synchronize(DoOnTime);
end;
if (not Terminated) then
Sleep(CThreadPauseTime * 1000);
end;
end;
...