Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define OnPlayerCommandText czcmd_OnPlayerCommandText
- forward czcmd_OnPlayerCommandText(playerid, cmdtext[]);
- #define _ALS_OnPlayerCommandText
- #include <zcmd>
- CMD:first(playerid, params[]){ return 1; }
- CMD:last(playerid, params[]){ return 1; }
- #undef CMD
- #undef COMMAND
- #undef OnPlayerCommandText
- #define OnPlayerCommandText cdcmd_OnPlayerCommandText
- forward cdcmd_OnPlayerCommandText(playerid, cmdtext[]);
- #define _ALS_OnPlayerCommandText
- #include <dcmd>
- CMD:first(playerid, params[]){ return 1; }
- CMD:last(playerid, params[]){ return 1; }
- #undef CMD
- #undef COMMAND
- main()
- {
- new
- t0,
- t1,
- t2,
- t3,
- t4;
- t0 = GetTickCount();
- for (new i = 0; i != 10000; ++i)
- {
- cdcmd_OnPlayerCommandText(0, "/first 20");
- cdcmd_OnPlayerCommandText(0, "/last 20");
- }
- t1 = GetTickCount();
- for (new i = 0; i != 10000; ++i)
- {
- cdcmd_OnPlayerCommandText(0, "/first 20");
- cdcmd_OnPlayerCommandText(0, "/last 20");
- }
- t2 = GetTickCount();
- for (new i = 0; i != 10000; ++i)
- {
- czcmd_OnPlayerCommandText(0, "/first 20");
- czcmd_OnPlayerCommandText(0, "/last 20");
- }
- t3 = GetTickCount();
- for (new i = 0; i != 10000; ++i)
- {
- czcmd_OnPlayerCommandText(0, "/first 20");
- czcmd_OnPlayerCommandText(0, "/last 20");
- }
- t4 = GetTickCount();
- printf("%d - DCMD\n%d - DCMD\n%d - ZCMD\n%d - ZCMD", t1 - t0, t2 - t1, t3 - t2, t4 - t3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement