取得自从开机到现在CPU运行的周期数,超毫秒级的精度 (转)

取得自从开机到现在CPU运行的周期数,超毫秒级的精度 (转)[@more@]

取得自从开机到现在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;

//rock
//转载请保留此信息


请使用浏览器的分享功能分享到微信等