X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fprofiler.h;h=f69f06adb4d5929434f5f1816591032fb34fefb5;hp=a20b8d847bc14f2ac107129ab377bd1a95974393;hb=f28146cf72fc68c8d3690814b1f89d47b8c4e7b9;hpb=a8297c3461718f2d9afc7a2f8ca620d320ac5f97 diff --git a/src/profiler.h b/src/profiler.h index a20b8d8..f69f06a 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -12,12 +12,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 +33,7 @@ namespace IPDF std::map m_zones; std::stack m_zone_stack; + bool m_enabled; }; extern Profiler g_profiler;