I have four variables
LARGE_INTEGER m_liPerfStart;LARGE_INTEGER m_liPerfLast;LARGE_INTEGER m_liPerfFreq; float m_fFractionOfSecondPassed; I reset the timer at the start of my program by doing the following
m_fFractionOfSecondPassed = 0.0f;QueryPerformanceFrequency(&m_liPerfFreq);QueryPerformanceCounter(&m_liPerfStart);m_liPerfLast = m_liPerfStart;Whenever I update my timer (such as at the end of the update loop)
m_liPerfLast = m_liPerfStart;QueryPerformanceCounter(&m_liPerfStart);m_fFractionOfSecondPassed = (m_liPerfStart.QuadPart - m_liPerfLast.QuadPart) / (float)m_liPerfFreq.QuadPart;My question is, is this the best way to get the fraction of a second passed since the last reset (or update)?