SA-MP Forums Archive
One timer or more? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: One timer or more? (/showthread.php?tid=180563)



One timer or more? - Whizion - 02.10.2010

So whats better:

#1: Having one timer doing all the work you need.
#2: Having as much timers you need to do your work.

I was thinking of creating a 1 second timer, and save thicks in variables so i can delay things.

Thanks for the answers.


Re: One timer or more? - Kitten - 02.10.2010

Quote:
Originally Posted by Whizion
Посмотреть сообщение
So whats better:

#1: Having one timer doing all the work you need.
#2: Having as much timers you need to do your work.

I was thinking of creating a 1 second timer, and save thicks in variables so i can delay things.

Thanks for the answers.

I suggest # 1 and #2 it depends what you use the "work"


Re: One timer or more? - Retardedwolf - 02.10.2010

It depends on what kind of script and what you use the timers for.


Re: One timer or more? - SAW-RL - 02.10.2010

Quote:
Originally Posted by Kitten
Посмотреть сообщение
I suggest # 1 and #2 it depends what you use the "work"
/sign.

It is not good, to run several timers at the same time..


Re: One timer or more? - Memoryz - 02.10.2010

IF you have several 1 seconds timers, it is better to make it into just one and do all the functions in that one.


Re: One timer or more? - Calgon - 02.10.2010

I was wondering about this a while ago too (by a while ago, I mean sometime last year).

The most efficient way is to use a few X ms timers, the more clogged up with code a function that a timer processes is the slower that a function will process. Hence why it's better to use 1-3 timers. Correct me if I'm wrong, but this is the best way that I've used/seen.


Re: One timer or more? - Steven82 - 02.10.2010

Quote:
Originally Posted by Calgon
Посмотреть сообщение
I was wondering about this a while ago too (by a while ago, I mean sometime last year).

The most efficient way is to use a few X ms timers, the more clogged up with code a function that a timer processes is the slower that a function will process. Hence why it's better to use 1-3 timers. Correct me if I'm wrong, but this is the best way that I've used/seen.
Calgon your correct ^^


Re: One timer or more? - Whizion - 02.10.2010

Thank's all for the advices.

This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds.


Re: One timer or more? - New_Player[USW] - 02.10.2010

RetardedWolf is right, It really depends on what script you use.

This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. -.-