1 #ifndef BLANK_APP_FRAMECOUNTER_HPP_
2 #define BLANK_APP_FRAMECOUNTER_HPP_
26 void EnterFrame() noexcept;
27 void EnterHandle() noexcept;
28 void ExitHandle() noexcept;
29 void EnterUpdate() noexcept;
30 void ExitUpdate() noexcept;
31 void EnterRender() noexcept;
32 void ExitRender() noexcept;
33 void ExitFrame() noexcept;
35 const Frame<int> &Peak() const noexcept { return peak; }
36 const Frame<float> &Average() const noexcept { return avg; }
38 bool Changed() const noexcept { return changed; }
40 void Print(std::ostream &) const;
45 void Accumulate() noexcept;
49 static constexpr int NUM_FRAMES = 32;
50 static constexpr float factor = 1.0f / float(NUM_FRAMES);
52 Uint32 last_enter = 0;
56 Frame<int> current = Frame<int>{};
57 Frame<int> sum = Frame<int>{};
58 Frame<int> max = Frame<int>{};
60 Frame<int> peak = Frame<int>{};
61 Frame<float> avg = Frame<float>{};
69 FrameCounter::Frame<T>::Frame()