var
aNow,aThen,aTime:Longint;
begin
aThen := GetTickCount();
Sleep(1000);//代码段
aNow := GetTickCount();
aTime := aNow-aThen;
ShowMessage(IntToStr(a));
end;
用GetTickCount()计算一段代码执行耗费的时间的小例子,布布扣,bubuko.com
时间: 2024-10-03 20:35:20
var
aNow,aThen,aTime:Longint;
begin
aThen := GetTickCount();
Sleep(1000);//代码段
aNow := GetTickCount();
aTime := aNow-aThen;
ShowMessage(IntToStr(a));
end;
用GetTickCount()计算一段代码执行耗费的时间的小例子,布布扣,bubuko.com