Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // measurement vars
- LARGE_INTEGER start, stop, freq;
- //
- // flush command buffer here
- //
- //
- // issue begin query here
- //
- // start timer
- QueryPerformanceCounter(&start);
- //
- //draw
- //
- //
- // issue end query here and wait on results
- //
- // stop timer
- QueryPerformanceCounter(&stop);
- // calc elapsed ticks
- stop.QuadPart -= start.QuadPart;
- // get frequency
- QueryPerformanceFrequency(&freq);
- // ticks for easier handling
- ULONG ticks = stop.QuadPart;
- // calc elapsed clock cycles
- cycles = (2.8E9 * ticks) / (double)freq.QuadPart;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement