Lag related to timers.
#3

to estimate the CPU usage you can use this formula:
CPU usage = (1000 ms / delay in ms) * scriptsize
1 second equals 1000 milliseconds. if you got a timer running on a very low delay, like 10 ms, it will get launched 100 times per second (1000/10 = 100). multiply that amount with the scipt sontent. its vital to avoid big loops and deep mathematical calculations. using a timer of 1000 instead 100 ms, will use 1/10 of the CPU time then. for empty timers, the lower one will use some CPU time indeed, coz it gets "triggered" more often. avoid per player timers running forever, they can cause trouble if some other vital timers "needs" to be called at a time where a "per player" timer is running. doing a loop for all players in one seperate timer, is the best way to take care for all players...
Reply


Messages In This Thread
Lag related to timers. - by Cpt.Falcon - 16.03.2012, 20:45
Re: Lag related to timers. - by new121 - 16.03.2012, 20:55
Re: Lag related to timers. - by Babul - 16.03.2012, 21:30
AW: Lag related to timers. - by Littl3j0hNy - 18.03.2012, 01:57

Forum Jump:


Users browsing this thread: 1 Guest(s)