procedure TimeProc(uTimerID
dwUser
begin
Form
smmCount:=smmCount
end;
procedure TForm
begin
Button
Button
Button
Button
Timer
smmCount:=
sTimerCount:=
sPCount:=
end;
procedure TForm
var
lgTick
fTemp:Single;
begin
Button
Button
Timer
Timer
proTimeCallback:=TimeProc;
hTimeID:=timeSetEvent(
actTime
//獲得系統的高性能頻率計數器在一毫秒內的震動次數
QueryPerformanceFrequency(lgPer);
fTemp:=lgPer/
iTen:=Trunc(fTemp*
QueryPerformanceCounter(lgTick
lgTick
sPCount:=
while sPCount>
QueryPerformanceCounter(lgTick
//如果時鐘震動次數超過
If lgTick
lgTick
sPCount := sPCount
Edit
Application
end;
end;
end;
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/25028.html