大概1秒钟吧
program Project2;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
Winapi.Windows;
function GetRandomid(vlen: integer): string;
var
i, t: integer;
lc: array[0..14] of char;
const lchar:string ='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
begin
Result := '';
lc := '';
for i := 0 to vlen -1 do
lc[i] := lchar[Random(62) + 1];
Result := lc;
end;
var
t,i: Integer;
lstr: string;
begin
try
t := GetTickCount;
randomize;
for I := 1 to 10000000 do
begin
if i < 101 then
Writeln(GetRandomid(15))
else
GetRandomid(15);
end;
t := GetTickCount - t;
Writeln(Format('10000000次 %d 毫秒',[t]));
Readln(lstr);
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.