Timer Problem

Started by
-1 comments, last by Metzler 21 years, 1 month ago
Hello, I wrote a class with my timer functions. It looks the following : LONGLONG GAME_HELPER:erf_Timer() { LONGLONG temp = 0; if (best_perf) { QueryPerformanceCounter((LARGE_INTEGER *)&temp); return temp; } else return timeGetTime(); } GAME_HELPER::GAME_HELPER() { if (QueryPerformanceFrequency((LARGE_INTEGER*)&perf_cnt)) { best_perf = true; time_scale = 1.0/perf_cnt; } else { best_perf = false; time_scale = 0.001; perf_cnt = 1000; } } The problem is, that Perf_Timer() returns 0, wenn best_perf flag is set to false. Why ?? THX for answers !

This topic is closed to new replies.

Advertisement