Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

37 righe
614 B

  1. //
  2. // Deus Hax (working title)
  3. // Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
  4. //
  5. //
  6. // The Profiler class
  7. // -------------------
  8. // The Profiler is a static class that collects statistic counters.
  9. //
  10. #if !defined __DH_PROFILER_H__
  11. #define __DH_PROFILER_H__
  12. #include <stdint.h>
  13. class Profiler
  14. {
  15. public:
  16. enum
  17. {
  18. STAT_TICK_FRAME = 0,
  19. STAT_TICK_GAME,
  20. STAT_TICK_DRAW,
  21. STAT_TICK_BLIT,
  22. STAT_COUNT
  23. };
  24. static void Start(int id);
  25. static void Stop(int id);
  26. static float GetAvg(int id);
  27. static float GetMax(int id);
  28. };
  29. #endif // __DH_PROFILER_H__