本文整理自网络,侵删。
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 10.3.x 截取字符串函数substring 和copy()常用字串符处理函数用法
Delphi xe10 手机端错误提示:detected problems with api compatibility (visit g.co/dev/appcompat for more info
Delphi 10 seattle的android应用程序中使用参数启动服务
更多相关阅读请进入《Delphi》频道 >>