核心提示:取得自从开机到现在CPU运行的周期数,超毫秒级的精度 function Ticker : DWord; register; begin asm push EAX push EDX...
取得自从开机到现在CPU运行的周期数,超毫秒级的精度
function Ticker : DWord; register;
begin
asm
push EAX
push EDX
db $0f,$31
mov Result, EAX
pop EDX
pop EAX
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(inttostr( Ticker));
end;