SetTimer vs SetTimerEx
#1

Do you think it's better to create 1 timer when the server loads (using SetTimer) and then loop through all players to save their stats or use SetTimerEx to create a timer each time they login?
Reply
#2

I think it will be more good if you will use one timer when the server loads.
Reply
#3

That's what I'm thinking too, anyone else?
Reply
#4

One timer, obviously. Timers are highly inefficient.
Reply
#5

One timer, but don't save all players at a time (do it one player each time for example).
Reply
#6

Quote:
Originally Posted by Jay_
Посмотреть сообщение
One timer, obviously. Timers are highly inefficient.
Are you kidding me xD You made my day thanks So you mean it takes a lot of prepossessing power to have a timer running? Then your more then wrong. The thing that takes time to execute is the callback the timer is calling but a callback that are only ran for one player will take less time then one that loops true all connected players.

Now to the real question. of course it's better to spread out the load over a larger time period in single thread languages as pawn. So yes it's better to start one timer for every player then to start one timer with a function that loops true all the players. This gets more important on slow script like saving stats and so on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)