MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / CpuTimer

Method CpuTimer

framework/d3d11/amd_sdk/src/Timer.cpp:66–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64//-----------------------------------------------------------------------------
65
66CpuTimer::CpuTimer() :
67Timer()
68{
69 LARGE_INTEGER freq;
70 QueryPerformanceFrequency( &freq );
71 m_freq = static_cast<double>(freq.QuadPart);
72
73#if USE_RDTSC
74 const double calibrationTime = 0.1;
75
76 LONGLONG start, stop;
77 start = rdtsc_time();
78 Delay(calibrationTime);
79 stop = rdtsc_time();
80
81 m_freqRdtsc = static_cast<double>(stop - start) / calibrationTime;
82#endif
83}
84
85CpuTimer::~CpuTimer()
86{

Callers

nothing calls this directly

Calls 1

rdtsc_timeFunction · 0.85

Tested by

no test coverage detected