Delphi 计算程序运行时间

var
  StartTime, EndTime: cardinal;
begin
  StartTime := GetTickCount;
  sleep(1000);
  EndTime := GetTickCount;
  caption := (IntToStr(EndTime - StartTime) + ' ms');
end;

 

posted @ 2022-03-26 09:08  Thenext  阅读(334)  评论(0)    收藏  举报