SetTimerEx taking more time
#3

https://sampforum.blast.hk/showthread.php?tid=375925

Quote:
Originally Posted by ******
Посмотреть сообщение
SetTimer(Ex)

These functions are not very accurate and that they don't correctly support strings and arrays. Both these problems are now fixed to the best of my ability. I should note that the accuracy is still a little off because of the "sleep" call in the server internally, but they're MUCH better now.

I've also improved their performance through the use of "std::priority_queue" so the next timers to trigger are always at the top of the list.

A note when passing arrays, as with "CallLocalFunction" you MUST follow the array with its length as an extra parameter or the system has no way to know how big it is:

pawn Код:
SetTimerEx("func", 1000, 0, "ai", arr, sizeof (arr));
These functions are not changed in ANY way, "0" still means "run once", anything else still means "run forever". You don't even need to recompile to use the new versions, just use the plugin.
Reply


Messages In This Thread
SetTimerEx taking more time - by TwinkiDaBoss - 17.10.2014, 01:15
Re: SetTimerEx taking more time - by Pottus - 17.10.2014, 01:19
Re: SetTimerEx taking more time - by SickAttack - 17.10.2014, 01:23
Re: SetTimerEx taking more time - by TwinkiDaBoss - 17.10.2014, 01:33

Forum Jump:


Users browsing this thread: 1 Guest(s)