Re: [GD-Windows] More timer fun! (sorry for revisit!)
Brought to you by:
vexxed72
From: Pierre T. <p.t...@wa...> - 2002-12-24 06:09:41
|
> Thus, the best implementation of reading > the time stamp counter is this: > > inline uint64 read_tsc() > { > __asm { > rdtsc > } > } Actually the best implementation is to insert a cpuid instruction before rdtsc, to prevent out-of-sequence execution from ruining the results. For more details, please refer to Intel's application notes "Using the RDTSC instruction for performance monitoring". Pierre |