1 #ifndef CORE_TIMER_H
2 #define CORE_TIMER_H
3 
4 #include <string>
5 
6 #include "gl.h"
7 
8 class GLTimer {
9     Uint32   query_start;
10     Uint32   query_stop;
11     Uint32   cpu_time;
12     GLuint64 query_value;
13     GLuint   query_id;
14     std::string name;
15 public:
16     GLTimer();
17     GLTimer(const std::string& name);
18     ~GLTimer();
19 
20     void start();
21     void stop();
22     bool check();
23 
24     const std::string& getName() const;
25     GLuint64 getValue() const;
26     Uint32   getGLMillis() const;
27     Uint32   getCPUMillis() const;
28 
29     void unload();
30 };
31 
32 #endif
33