Код:
procedure Delay(Value: Cardinal);
var
F, N: Cardinal;
begin
N := 0;
while N <= (Value div 10) do
begin
SleepEx(1, True);
Application.ProcessMessages;
Inc(N);
end;
F := GetTickCount;
repeat
Application.ProcessMessages;
N := GetTickCount;
until (N - F >= (Value mod 10)) or (N < F);
end;
А использование этой процедуры: