program rdtsc_view; {$APPTYPE CONSOLE} uses SysUtils, windows; function tsc: Int64; var ts: record case byte of 1: (count: Int64); 2: (b, a: cardinal); end; begin asm db $F; db $31; mov [ts.a], edx mov [ts.b], eax end; tsc:=ts.count; end; begin repeat WriteLn(FloatToStr(tsc)) until false; end. // begin_end (C) 2009