[QUESTION] what's better
#1

what would you say's less lag two timers with doing its own function in each of them or one timer with both function in the one callback?
Reply
#2

For less lag towards the players, 2 timers that 'DO NOT' intersect eachother (or otherwise execute at the same time) so run one at '1000' ms and the other at '999' ms.
Reply
#3

Quote:
Originally Posted by Joe Staff
For less lag towards the players, 2 timers that 'DO NOT' intersect eachother (or otherwise execute at the same time) so run one at '1000' ms and the other at '999' ms.
wouldn't it be better to put both callbacks into one callback or shall i do it how you said.
Reply
#4

****** has made an entire tutorial and function for this kind of thing, go searching through his stuff.
Reply
#5

Quote:
Originally Posted by Joe Staff
****** has made an entire tutorial and function for this kind of thing, go searching through his stuff.
lol yeah i saw that topic i just never got to the bottom of it before i got tired.
Reply
#6

If you are processing functions for players then definitely OnPlayerUpdate with ticks. Otherwise one timer, two functions from my side.
Reply
#7

Quote:
Originally Posted by $ЂЯĢ
If you are processing functions for players then definitely OnPlayerUpdate with ticks. Otherwise one timer, two functions from my side.
so one timer 2 function's is less lag then having two timer one 1999 and the other 2000?
Reply
#8

Unless you expect 500 players on your server, or you suck at scripting that you can't optimize your code, it should not be any noticable difference.
Reply
#9

Quote:
Originally Posted by //exora
Unless you expect 500 players on your server, or you suck at scripting that you can't optimize your code, it should not be any noticable difference.
no i don't have 500 players and i am optimizing my code, i just wasn't to sure what worked faster on timers.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)