1 #ifndef BLANK_APP_FRAMECOUNTER_HPP_
2 #define BLANK_APP_FRAMECOUNTER_HPP_
25 void EnterFrame() noexcept;
26 void EnterHandle() noexcept;
27 void ExitHandle() noexcept;
28 void EnterUpdate() noexcept;
29 void ExitUpdate() noexcept;
30 void EnterRender() noexcept;
31 void ExitRender() noexcept;
32 void ExitFrame() noexcept;
34 const Frame<int> &Peak() const noexcept { return peak; }
35 const Frame<float> &Average() const noexcept { return avg; }
37 bool Changed() const noexcept { return changed; }
42 void Accumulate() noexcept;
46 static constexpr int NUM_FRAMES = 32;
47 static constexpr float factor = 1.0f / float(NUM_FRAMES);
49 Uint32 last_enter = 0;
53 Frame<int> current = Frame<int>{};
54 Frame<int> sum = Frame<int>{};
55 Frame<int> max = Frame<int>{};
57 Frame<int> peak = Frame<int>{};
58 Frame<float> avg = Frame<float>{};