Mega Code Archive

 
Categories / Delphi / Examples
 

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;