c++ - Firefox interacts with my timers ?! (followup) -


first please read older post in thought fixed it. (skip if don't have time)

firefox interacts timers somehow ?!?! crazy ^^

for not want read, i'll sum up: firefox messes timers when running had switch timegettime() queryperformancecounter(), recommended stackoverflow members.. , still subjected same problem (firefox running makes 'fast forwarded'). , don't understand why now. maybe messing somehow here:

ulong ctimer::time() {     __int64 temp;     queryperformancecounter((large_integer*)&temp);     return (ulong)(temp*1000/freq); } // freq 1 queried queryperformancefrequency() 

anybody has idea ? tips welcomed.

how calculating motion? if accurately calculate delta-time (the time since last tick) queryperformancecounter, , calculate motion based on that, should fine. distance each object moves per tick should deltatime * speed.

my best guess you're not doing that, , instead it's based on framerate, , framerate changes when open firefox (for whatever reason). showing code helpful.

one more thing - queryperformancecounter/frequency may different different cores - application multithreaded? if so, opening firefox may cause windows shift application executing different core, queryperformancecounter/frequency different. must make sure call them same processor core (set processor affinity on thread calls them).


Comments