Debian Codegraph @

src/gengine/TimerAgent.h

raw
1 #ifndef HEADER_TIMERAGENT_H
2 #define HEADER_TIMERAGENT_H
3
4 #include "BaseAgent.h"
5 #include "Name.h"
6
7 #include "SDL.h"
8
9 /**
10 * Delay and framerame.
11 */
12 class TimerAgent : public BaseAgent {
13 AGENT(TimerAgent, Name::TIMER_NAME);
14 private:
15 int m_timeinterval;
16 Uint32 m_lastTime;
17 Uint32 m_nextTime;
18 Uint32 m_deltaTime;
19 int m_count;
20 private:
21 int getTimeInterval();
22 protected:
23 virtual void own_init();
24 virtual void own_update();
25 public:
26 Uint32 getDeltaTime() const { return m_deltaTime; }
27 int getCycles() const { return m_count; }
28 };
29
30 #endif