Advertisement
DanGT

teste

Feb 13th, 2015
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define OnPlayerCommandText czcmd_OnPlayerCommandText
  4. forward czcmd_OnPlayerCommandText(playerid, cmdtext[]);
  5. #define _ALS_OnPlayerCommandText
  6.  
  7. #include <zcmd>
  8.  
  9. CMD:first(playerid, params[]){ return 1; }
  10. CMD:last(playerid, params[]){ return 1; }
  11.  
  12. #undef CMD
  13. #undef COMMAND
  14.  
  15. #undef OnPlayerCommandText
  16.  
  17. #define OnPlayerCommandText cdcmd_OnPlayerCommandText
  18. forward cdcmd_OnPlayerCommandText(playerid, cmdtext[]);
  19. #define _ALS_OnPlayerCommandText
  20.  
  21. #include <dcmd>
  22.  
  23. CMD:first(playerid, params[]){ return 1; }
  24. CMD:last(playerid, params[]){ return 1; }
  25.  
  26. #undef CMD
  27. #undef COMMAND
  28.  
  29. main()
  30. {
  31. new
  32. t0,
  33. t1,
  34. t2,
  35. t3,
  36. t4;
  37. t0 = GetTickCount();
  38. for (new i = 0; i != 10000; ++i)
  39. {
  40. cdcmd_OnPlayerCommandText(0, "/first 20");
  41. cdcmd_OnPlayerCommandText(0, "/last 20");
  42. }
  43. t1 = GetTickCount();
  44. for (new i = 0; i != 10000; ++i)
  45. {
  46. cdcmd_OnPlayerCommandText(0, "/first 20");
  47. cdcmd_OnPlayerCommandText(0, "/last 20");
  48. }
  49. t2 = GetTickCount();
  50. for (new i = 0; i != 10000; ++i)
  51. {
  52. czcmd_OnPlayerCommandText(0, "/first 20");
  53. czcmd_OnPlayerCommandText(0, "/last 20");
  54. }
  55. t3 = GetTickCount();
  56. for (new i = 0; i != 10000; ++i)
  57. {
  58. czcmd_OnPlayerCommandText(0, "/first 20");
  59. czcmd_OnPlayerCommandText(0, "/last 20");
  60. }
  61. t4 = GetTickCount();
  62. printf("%d - DCMD\n%d - DCMD\n%d - ZCMD\n%d - ZCMD", t1 - t0, t2 - t1, t3 - t2, t4 - t3);
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement