var
begtime: cardianl;
begin
while not terinated do
begin
begtime := GetTickCount;
while (GetTickCount-begtime > 100) do
sleep( 10 ); // 稍微休息一下,要不然cpu一直100%
var
begtime: dword;
begin
begtime := GetTickCount;
while (GetTickCount-begtime > 100) and (not Terminated) do //具体间隔时间你自己调整
begin
dosth...
begtime := GetTickCount;
end;