source: trunk/src/profiler.h @ 122

Last change on this file since 122 was 122, checked in by sam, 11 years ago

Implement the profiling system.

  • Property svn:keywords set to Id
File size: 617 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
4//
5
6//
7// The Profiler class
8// -------------------
9// The Profiler is a static class that collects statistic counters.
10//
11
12#if !defined __DH_PROFILER_H__
13#define __DH_PROFILER_H__
14
15#include <stdint.h>
16
17class Profiler
18{
19public:
20    enum
21    {
22        STAT_TICK_FRAME = 0,
23        STAT_TICK_GAME,
24        STAT_TICK_RENDER,
25        STAT_TICK_BLIT,
26        STAT_COUNT
27    };
28
29    static void Start(int id);
30    static void Stop(int id);
31    static float GetMean(int id);
32    static float GetMax(int id);
33};
34
35#endif // __DH_PROFILER_H__
36
Note: See TracBrowser for help on using the repository browser.