skia2/tools/timer
Mike Klein 912947737a Use __rdtsc on Windows.
This seems to be ~100x higher resolution than QueryPerformanceCounter.  AFAIK, all our Windows perf bots have constant_tsc, so we can be a bit more direct about using rdtsc directly: it'll always tick at the max CPU frequency.

Now, the question remains, what is the max CPU frequency to divide through by?  It looks like QueryPerformanceFrequency actually gives the CPU frequency in kHz, suspiciously exactly what we need to divide through to get elapsed milliseconds.  That was a freebie.

I did some before/after comparison on slow benchmarks.  Timings look the same.  Going to land this without review tonight to see what happens on the bots; happy to review carefully tomorrow.

R=mtklein@google.com
TBR=bungeman

BUG=skia:

Review URL: https://codereview.chromium.org/394363003
2014-07-16 19:59:32 -04:00
..
GpuTimer.cpp Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
GpuTimer.h Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
SysTimer_mach.cpp Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
SysTimer_mach.h Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
SysTimer_posix.cpp Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
SysTimer_posix.h Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
SysTimer_windows.cpp Use __rdtsc on Windows. 2014-07-16 19:59:32 -04:00
SysTimer_windows.h Use __rdtsc on Windows. 2014-07-16 19:59:32 -04:00
Timer.cpp Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
Timer.h Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
TimerData.cpp Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00
TimerData.h Move BenchTimer to tools as Timer 2014-06-20 11:29:21 -07:00