22 QueryPerformanceFrequency(&mFrequency);
23 QueryPerformanceCounter(&mStartTime);
24 mStartTick = GetTickCount();
32 LARGE_INTEGER curTime;
35 QueryPerformanceCounter(&curTime);
36 LONGLONG newTime = curTime.QuadPart - mStartTime.QuadPart;
39 unsigned long newTicks = (
unsigned long) (1000 * newTime / mFrequency.QuadPart);
43 unsigned long check = GetTickCount() - mStartTick;
44 signed long msecOff = (
signed long)(newTicks - check);
45 if (msecOff < -100 || msecOff > 100)
48 LONGLONG adjust = (std::min)(msecOff * mFrequency.QuadPart / 1000, newTime - mLastTime);
49 mStartTime.QuadPart += adjust;
53 newTicks = (
unsigned long) (1000 * newTime / mFrequency.QuadPart);
63 LARGE_INTEGER curTime;
64 QueryPerformanceCounter(&curTime);
65 LONGLONG newTime = curTime.QuadPart - mStartTime.QuadPart;
68 unsigned long newTicks = (
unsigned long) (1000 * newTime / mFrequency.QuadPart);
72 unsigned long check = GetTickCount() - mStartTick;
73 signed long msecOff = (
signed long)(newTicks - check);
74 if (msecOff < -100 || msecOff > 100)
77 LONGLONG adjust = (std::min)(msecOff * mFrequency.QuadPart / 1000, newTime - mLastTime);
78 mStartTime.QuadPart += adjust;
86 unsigned long newMicro = (
unsigned long) (1000000 * newTime / mFrequency.QuadPart);
92 clock_t newClock = clock();
93 return (
unsigned long)((float)(newClock-zeroClock) / ((float)CLOCKS_PER_SEC/1000.0)) ;
98 clock_t newClock = clock();
99 return (
unsigned long)((float)(newClock-zeroClock) / ((float)CLOCKS_PER_SEC/1000000.0)) ;