Ok, that also works and I suppose it's safer than sleep().

Thanks!

I now have:
StartTime : cardinal;
Duration : cardinal;
where StartTime := 0 and
Duration := 1000.

Code:
StartTime := GetTickCount;
  while &#40;GetTickCount - StartTime&#41; < Duration do
  begin
  application.ProcessMessages;
  end;