Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

profiler.h 1.1 KiB

il y a 14 ans
il y a 14 ans
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. //
  11. // The Profiler class
  12. // -------------------
  13. // The Profiler is a static class that collects statistic counters.
  14. //
  15. #if !defined __LOL_PROFILER_H__
  16. #define __LOL_PROFILER_H__
  17. #include <stdint.h>
  18. namespace lol
  19. {
  20. class Profiler
  21. {
  22. public:
  23. enum
  24. {
  25. STAT_TICK_FRAME = 0,
  26. STAT_TICK_GAME,
  27. STAT_TICK_DRAW,
  28. STAT_TICK_BLIT,
  29. STAT_USER_00,
  30. STAT_USER_01,
  31. STAT_USER_02,
  32. STAT_USER_03,
  33. STAT_USER_04,
  34. STAT_USER_05,
  35. STAT_USER_06,
  36. STAT_USER_07,
  37. STAT_USER_08,
  38. STAT_USER_09,
  39. STAT_COUNT
  40. };
  41. static void Start(int id);
  42. static void Stop(int id);
  43. static float GetAvg(int id);
  44. static float GetMax(int id);
  45. };
  46. } /* namespace lol */
  47. #endif // __LOL_PROFILER_H__