Performance Question: About Timers. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Performance Question: About Timers. (
/showthread.php?tid=618366)
Performance Question: About Timers. -
godless_phoenix - 05.10.2016
Which way is better?
Action: Call x for y times within z interval.
Quote:
rfunction(datas,y,z){
y--;
if(y>0)
SetTimerEx("rfunction", z, 0, "iiii", datas,y,z);
x(datas);
}
|
OR
Quote:
tfunction(datas,y,z){
new i=SetTimerEx("x", z, 1, "dddd", datas);
SetTimerEx("KillTimer", y*z, 0, "d", i);
}
|
Re: Performance Question: About Timers. -
SickAttack - 05.10.2016
The less each timer has to process, the better.
Re: Performance Question: About Timers. -
godless_phoenix - 05.10.2016
Thanks @SickAttack
Also i didnt search well before post that question but there are lots of discussion topic about it. Sorry for that.
Re: Performance Question: About Timers. -
godless_phoenix - 05.10.2016
I updated first post with another question.