Yes, this would possible, but be sure to have
new start = ... as the very first line, and the
printf as the very last line just before return.
The whole cmd code has to be between them. But this is not the best way, as normal commands wont take longer than a few ms, so you cant really test them like this.
The best way would be another command that runs the tested command a lot of times, so it takes longer and you can see differences more clearly:
pawn Код:
new start = GetTickCount();
for(new i = 0; i < 10000; i ++) zcmd_test(playerid, params);
printf("Time needed for 10.000 calls: %d", GetTickCount() - start);