[computer-go] Precise clock cycles measurements

Dave Denholm ddenholm at esmertec.com
Mon Sep 4 03:28:33 PDT 2006


"Mike Young" <mikewhy at sbcglobal.net> writes:


> For VC7.x:
>
> typedef TickCount unsigned __int64;
>
> __forceinline TickCount GetPerfCount()
> {    __asm rdtsc;
> }
>
> VC8 removed asm support for rdtsc.
>

win32 provides a fn  QueryPerformanceCounter() which [probably]
accesses this timer in a portable way. This should work on all
versions of windows. As a function call, it might have more overhead
though.

dd
-- 
Dave Denholm              <ddenholm at esmertec.com>       http://www.esmertec.com


More information about the computer-go mailing list