X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fprofiler.h;h=e406536ecc74b49876066a5f9eaca7c497b5f1b0;hp=a20b8d847bc14f2ac107129ab377bd1a95974393;hb=f0b6c9b6b95fde134927c395afbfbbbc057868e6;hpb=a8297c3461718f2d9afc7a2f8ca620d320ac5f97 diff --git a/src/profiler.h b/src/profiler.h index a20b8d8..e406536 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -1,6 +1,7 @@ #ifndef _PROFILER_H #define _PROFILER_H +#include #include #include #include @@ -12,12 +13,14 @@ namespace IPDF class Profiler { public: - Profiler() {} + Profiler() : m_enabled(false) {} void BeginZone(std::string name); void EndZone(); void EndFrame(); + + void Enable(bool enabled) { m_enabled = enabled; } private: struct ProfileZone { @@ -31,6 +34,7 @@ namespace IPDF std::map m_zones; std::stack m_zone_stack; + bool m_enabled; }; extern Profiler g_profiler;