var
iPos,iEnd,iTmp:Integer;
begin
iPos:=GetTickCount;
GetDataSet;
iEnd:=GetTickCount;
iTmp:=iEnd-ipos;
stat1.SimpleText:='记录数:'+inttostr(qry1.RecordCount)+'条;耗时:'+inttostr(iTmp)+'毫秒';
使用getTickCount实现延时
procedure Delay(msecs:integer);
var
FirstTickCount:longint;
begin
FirstTickCount:=GetTickCount;
repeat
Application.ProcessMessages;
until ((GetTickCount-FirstTickCount) >= Longint(msecs));
end;