本文整理自网络,侵删。
private lStart : Longint; lEnd : Longint; procedure GetStartTime; procedure GetEndTime; function GetRunTimes : Double;public
end; /////////////////////
procedure GetEndTime;begin lEnd := GetTickCount;end; function GetRunTimes: Double;begin Result := (lEnd - lStart) / 1000.0;end; procedure GetStartTime;begin lStart := GetTickCount;end;
//用法GetStartTime;//代码片段GetEndTime;
edit1.Text := FloatToStr(GetRunTimes);
Delphi 计算运行耗时的方法1http://www.delphitop.com/html/shijian/4340.html
相关阅读 >>
Delphi 关于选择文件路径 selectdirectory 弹出窗口居中的问题
Delphi xe8 androdi利用httpclient实现的一个app自动更新组件
Delphi sendmessage这个函数有很多奇妙的用途
更多相关阅读请进入《Delphi》频道 >>