S staven Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-13 #1 怎样判断一段程序代码执行的时间?用什么方法可以解决?
T TYZhang Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-13 #2 var i,j:integer; begin ; i:=gettickcount; ; ..........执行代码............. ; j:=gettickcount; ; j:=j-i; ; showmessage('执行时间:'+intTostr(j)); end;
var i,j:integer; begin ; i:=gettickcount; ; ..........执行代码............. ; j:=gettickcount; ; j:=j-i; ; showmessage('执行时间:'+intTostr(j)); end;
B Brave Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-13 #3 声明两个时间变量 procedure TForm1.Button1Click(Sender: TObject); var i,j:TDatetime; begin ; i:=now; ; showmessage('sdf'); ; j:=now-i; ; edit1.text:=formatDateTime('hh:mm:ss.zzz',j); end;
声明两个时间变量 procedure TForm1.Button1Click(Sender: TObject); var i,j:TDatetime; begin ; i:=now; ; showmessage('sdf'); ; j:=now-i; ; edit1.text:=formatDateTime('hh:mm:ss.zzz',j); end;