procedure TForm1.Button1Click(Sender: TObject);
var
i,count: Integer;
begin
count := GetTickCount();
Randomize;
i := random(9999999999);
while (i < 1000000000) do
i := random(9999999999);
Button1.Caption := '10位数:'+ IntToStr(i);
Caption := IntToStr(length(IntToStr(i)));
Caption := Caption + '位; 用时' + IntToStr(GetTickCount - count) + '秒';
end;