网上文摘 小说 Flash游戏 最近更新 下载排行 资源分类 下载指南
经典编程资源 精彩不容错过
设为首页
加入收藏
联系我们
当前位置:Delphi园地技巧文章编程心得 → 怎样得到查询所花费的时间
怎样得到查询所花费的时间
日期:2007年12月1日 作者:HNXXCXG 人气: 查看:[大字体 中字体 小字体]

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;  

(出处:http://www.delphibbs.com/keylife/iblog_show.asp?xid=29266)

相关文章:
 → 特别推荐
 → 热点TOP10
关于我们 | 广告服务 | 发布资源 | 联系站长 Copyright © 2002-2006 Delphi园地 All Rights Reserved