1 #ifndef RADIX_UTIL_PROFILER_HPP
2 #define RADIX_UTIL_PROFILER_HPP
14 std::chrono::time_point<std::chrono::high_resolution_clock>
m_begin,
m_end;
23 decltype(m_subprofilers)::iterator it = m_subprofilers.find(key);
24 if (it == m_subprofilers.end()) {
25 return m_subprofilers.emplace(std::piecewise_construct,
26 std::forward_as_tuple(key),
27 std::forward_as_tuple(key)
34 m_begin = std::chrono::high_resolution_clock::now();
38 m_end = std::chrono::high_resolution_clock::now();
45 decltype(m_begin)
begin()
const {
49 decltype(m_end)
end()
const {
53 decltype(m_end - m_begin) delta()
const {
57 std::string
dump()
const;
Definition: Profiler.hpp:11
std::chrono::time_point< std::chrono::high_resolution_clock > m_end
Definition: Profiler.hpp:14
Definition: GameController.hpp:7
std::chrono::time_point< std::chrono::high_resolution_clock > m_begin
Definition: Profiler.hpp:14
void stop()
Definition: Profiler.hpp:37
std::string name() const
Definition: Profiler.hpp:41
Profiler & operator[](const std::string &key)
Definition: Profiler.hpp:22
decltype(m_begin) begin() const
Definition: Profiler.hpp:45
void start()
Definition: Profiler.hpp:33
decltype(m_end) end() const
Definition: Profiler.hpp:49
Profiler(const std::string &name)
Definition: Profiler.hpp:18
std::string m_name
Definition: Profiler.hpp:13
std::map< std::string, Profiler > m_subprofilers
Definition: Profiler.hpp:15
std::string dump() const
Definition: Profiler.cpp:13