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; }
39 void Print(std::ostream &) const;
44 void Accumulate() noexcept;
48 static constexpr int NUM_FRAMES = 32;
49 static constexpr float factor = 1.0f / float(NUM_FRAMES);
51 Uint32 last_enter = 0;
55 Frame<int> current = Frame<int>{};
56 Frame<int> sum = Frame<int>{};
57 Frame<int> max = Frame<int>{};
59 Frame<int> peak = Frame<int>{};
60 Frame<float> avg = Frame<float>{};