• Advertisement


This topic is now archived and is closed to further replies.

Timer Problem

This topic is 5456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 !

Share this post

Link to post
Share on other sites

  • Advertisement