E esupermary Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-31 #1 我有两个事件,一个是BUTTON1CLICK,另一个是BUTTON2CLICK,我想知道我执行BUTTON1CLICK 后,又执行BUTTON2CLICK,两个事件的执行时间间隔。重点是要知道的时间是毫秒级的。
我有两个事件,一个是BUTTON1CLICK,另一个是BUTTON2CLICK,我想知道我执行BUTTON1CLICK 后,又执行BUTTON2CLICK,两个事件的执行时间间隔。重点是要知道的时间是毫秒级的。
影 影 子 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-31 #2 var iCount: longint=0;//全局变量 implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin iCount := GetTickCount; end; procedure TForm1.Button2Click(Sender: TObject); begin showmessage(IntToStr(GetTickCount-iCount)); end;
var iCount: longint=0;//全局变量 implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin iCount := GetTickCount; end; procedure TForm1.Button2Click(Sender: TObject); begin showmessage(IntToStr(GetTickCount-iCount)); end;
影 影 子 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-31 #7 [?] GetTickCount不是毫秒级?下面是帮助 The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started.
[?] GetTickCount不是毫秒级?下面是帮助 The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started.