[Tutorial] Speed test.
#3

Sorry if the topic is incomplete, I will try to explain more things.


Quote:
Originally Posted by Sublime
Посмотреть сообщение
The more loops, the more ms/s GTC prints.

Try using GetTickCount with a looped "gmx" and an unlooped "gmx"

You should also mention, when you use foreach to loop every player with a command, it lags more if there are more players, this should be in the thread as a conclusion

Although you didn't explain anything. What's the "-count"? Why do I have to define a variable as GetTickCount and use the same thing with GetTickCount again, this time by difference? (Could also me GetTickCount - GetTickCount, but why not?)
Yes, but not always we be be sure of what ID it is connected and what ID is not. Foreach only works for the connected ID's. On why it is necessary to store the variables, it is for that, as charm, SA-MP runs in an alone thread and every thing goes his time.

Then, when 'X' action is begun to execute, we create a variable and store it obtaining the time (GetTickCount), and on having finished this action, we format another not stored GetTickCount and reduce his value with the stored variable.

If we were reducing 'GetTickCount' with another 'GetTickCount', the value always would be: 0.

Sorry my bad english.

Regards.
Reply


Messages In This Thread
Speed test. - by Swedky - 08.01.2014, 01:52
Re: Speed test. - by Sublime - 08.01.2014, 11:50
Respuesta: Speed test. - by Swedky - 08.01.2014, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)