07.06.2011, 18:41
I made a test command-include, and I want to measure its speed.
I tried to do that:
(include)
(filterscript)
it just write 0 ms, and two Tick-values that are the same.
How can I determine the real run time of the include?
I tried to do that:
(include)
pawn Код:
new timr;
public OnPlayerCommandText(playerid, cmdtext[])
{
timr = GetTickCount();
// lots of code
return CallLocalFunction(cmdname, "is", playerid, params);
// code
}
// code
pawn Код:
KCMD:teszt1(playerid, params[])
{
new now = GetTickCount();
new msg[92];
format(msg, sizeof msg, "It took %d ms! (%d - %d)", now - timr, timr, now);
return SendClientMessage(playerid, 0x00ff00aa, msg);
}
How can I determine the real run time of the include?