#pragma once #include #include #include #include #include struct GraphTimer { public: GraphTimer(); ~GraphTimer(); unsigned int create_line(std::string label); unsigned int delete_line(unsigned int idx); void start(unsigned int idx); void stop(unsigned int idx); void frame(unsigned int idx, double delta_time); void draw(); private: static std::chrono::time_point start_time; static bool started; const unsigned int FPS_ARRAY_LENGTH = 1000; std::vector> fps_vectors; std::vector checkpoints; std::vector counters; std::vector labels; };