您现在的位置:首页 >> 基础算法 >> window基础 >> 内容

Delphi取得自从开机到现在CPU运行的周期数

时间:2011/9/3 15:36:35 点击:

  核心提示:取得自从开机到现在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;

作者:网络 来源:转载
共有评论 0相关评论
发表我的评论
  • 大名:
  • 内容:
  • 盒子文章(www.2ccc.com) © 2024 版权所有 All Rights Reserved.
  • 沪ICP备05001939号