[BUG]Timer too slow
#5

i had this problem, i just lowered the number, i will do math for you
if timer set for 60000 consistently takes 66000 you can add this to the end of all of your interval in the SetTimer function
pawn Код:
#define TimerInt(%1) floatround((float(%1) / (0.9075)))
the var should be your interval
i don't quite understand integer division, but it may work, not sure.
The shorter float provides more accuaracy, because your ten minute example was slightly different
1 min = 0.90909090909090909090909090909091
10 min = 0.90634441087613293051359516616314

addition:
i think there is something with timers that doesn't start the delay until it is called again until the function has returned. this may cause delays over time.

edit:
advice, don't check how many times it has been called, check the ms that have passed.
Reply


Messages In This Thread
[BUG]Timer too slow - by Remi-X - 27.10.2009, 18:41
Re: [BUG]Timer too slow - by Gergo1352 - 27.10.2009, 18:48
Re: [BUG]Timer too slow - by RyDeR` - 27.10.2009, 18:50
Re: [BUG]Timer too slow - by Remi-X - 27.10.2009, 18:52
Re: [BUG]Timer too slow - by Daren_Jacobson - 27.10.2009, 19:08
Re: [BUG]Timer too slow - by yom - 11.11.2009, 18:25
Re: [BUG]Timer too slow - by Danny_Costelo - 12.11.2009, 02:59

Forum Jump:


Users browsing this thread: 4 Guest(s)