Merge branch terrible and branch awful
[ipdf/code.git] / src / profiler.h
index a20b8d8..e406536 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _PROFILER_H
 #define _PROFILER_H
 
+#include <stdint.h>
 #include <map>
 #include <string>
 #include <stack>
@@ -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<std::string, ProfileZone> m_zones;
                std::stack<std::string> m_zone_stack;
+               bool m_enabled;
        };
 
        extern Profiler g_profiler;

UCC git Repository :: git.ucc.asn.au