SA-MP Forums Archive
Timers inaccuracy fix? - 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: Timers inaccuracy fix? (/showthread.php?tid=646583)



Timers inaccuracy fix? - Kampott - 19.12.2017

I need timers in pawno to be very accurate, are there any way to fix their inaccuracy using a plugin/include?


Re: Timers inaccuracy fix? - RIDE2DAY - 19.12.2017

Give a try to this plugin, it fixes many things:
https://sampforum.blast.hk/showthread.php?tid=571505

You have this standalone plugin also, but you must compile it:
https://github.com/udan11/samp-plugin-timerfix

On the other hand, with fixes like those avoid running timers which execute weighty code at the same time. Stay away from this:
PHP код:
SetTimer("FuncOne"1000true);
SetTimer("FuncTwo"1000true); 
When running weighty code at once the server gets into a "sleep" state, that might cause desync between players since the script is single thread.


Re: Timers inaccuracy fix? - jasperschellekens - 19.12.2017

Timers are really inaccurate, try using YSI_Timer for more accurate timers