git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfixes, performance fixes, tears.
[ipdf/code.git]
/
src
/
profiler.h
diff --git
a/src/profiler.h
b/src/profiler.h
index
a20b8d8
..
f69f06a
100644
(file)
--- a/
src/profiler.h
+++ b/
src/profiler.h
@@
-12,12
+12,14
@@
namespace IPDF
class Profiler
{
public:
class Profiler
{
public:
- Profiler() {}
+ Profiler()
: m_enabled(false)
{}
void BeginZone(std::string name);
void EndZone();
void EndFrame();
void BeginZone(std::string name);
void EndZone();
void EndFrame();
+
+ void Enable(bool enabled) { m_enabled = enabled; }
private:
struct ProfileZone
{
private:
struct ProfileZone
{
@@
-31,6
+33,7
@@
namespace IPDF
std::map<std::string, ProfileZone> m_zones;
std::stack<std::string> m_zone_stack;
std::map<std::string, ProfileZone> m_zones;
std::stack<std::string> m_zone_stack;
+ bool m_enabled;
};
extern Profiler g_profiler;
};
extern Profiler g_profiler;
UCC
git Repository :: git.ucc.asn.au