Get CPU ticks

How to retrieve the number of CPU cycles since the machine was started.

CPU Cycles



This method of measurement is more finite than milliseconds.



function Ticker : DWord; register;

begin

  asm

          push EAX

          push EDX

          db $0f,$31

          mov Result, EAX

          pop EDX

          pop EAX

  end;

end;

 

Share this article!

Follow us!

Find more helpful articles: