23 float64 b2Timer::s_invFrequency = 0.0f;
25 #define WIN32_LEAN_AND_MEAN 30 LARGE_INTEGER largeInteger;
32 if (s_invFrequency == 0.0
f)
34 QueryPerformanceFrequency(&largeInteger);
35 s_invFrequency =
float64(largeInteger.QuadPart);
36 if (s_invFrequency > 0.0
f)
38 s_invFrequency = 1000.0f / s_invFrequency;
42 QueryPerformanceCounter(&largeInteger);
43 m_start =
float64(largeInteger.QuadPart);
48 LARGE_INTEGER largeInteger;
49 QueryPerformanceCounter(&largeInteger);
50 m_start =
float64(largeInteger.QuadPart);
55 LARGE_INTEGER largeInteger;
56 QueryPerformanceCounter(&largeInteger);
62 #elif defined(__linux__) || defined (__APPLE__) 75 m_start_sec = t.tv_sec;
76 m_start_usec = t.tv_usec;
83 return 1000.0f * (t.tv_sec - m_start_sec) + 0.001
f * (t.tv_usec - m_start_usec);
float32 GetMilliseconds() const
Get the time since construction or the last reset.
void Reset()
Reset the timer.
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble f