program TCC_NTAPI; {$APPTYPE CONSOLE} uses SysUtils, windows, mmsystem; 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; function calibrate_runtime2:Int64; var i:byte; tstsc,tetsc,crtm, p:Int64; tmr:cardinal; begin tstsc:=tsc; crtm:=tsc-tstsc; for i:=0 to 9 do begin tmr:=CreateWaitableTimer(nil, false, nil); p:=0; tstsc:=tsc; SetWaitableTimer(tmr, p, 0, nil, nil, false); CloseHandle(tmr); crtm:=tsc-tstsc; if tetsc