8 #define PROFILE_SCOPE(name) IPDF::ProfilerScope _localProfZone(name)
15 Profiler() : m_enabled(false) {}
17 void BeginZone(std::string name);
22 void Enable(bool enabled) { m_enabled = enabled; }
34 std::map<std::string, ProfileZone> m_zones;
35 std::stack<std::string> m_zone_stack;
39 extern Profiler g_profiler;
42 ProfilerScope(std::string name) { g_profiler.BeginZone(name); }
43 ~ProfilerScope() { g_profiler.EndZone(); }