Mercurial > hg > svcore
diff base/Profiler.h @ 1222:771a17925576 piper
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 11:19:34 +0100 |
parents | c811991a5efa |
children | ad5f892c0c4d |
line wrap: on
line diff
--- a/base/Profiler.h Mon Oct 17 16:39:36 2016 +0100 +++ b/base/Profiler.h Thu Oct 20 11:19:34 2016 +0100 @@ -25,8 +25,6 @@ #include "system/System.h" -#include <ctime> -#include <sys/time.h> #include <map> #include "RealTime.h" @@ -41,6 +39,11 @@ #endif #endif +#ifndef NO_TIMING +#include <ctime> +#include <sys/time.h> +#endif + /** * Profiling classes */ @@ -56,12 +59,15 @@ static Profiles* getInstance(); ~Profiles(); +#ifndef NO_TIMING void accumulate(const char* id, clock_t time, RealTime rt); +#endif void dump() const; protected: Profiles(); +#ifndef NO_TIMING typedef std::pair<clock_t, RealTime> TimePair; typedef std::pair<int, TimePair> ProfilePair; typedef std::map<const char *, ProfilePair> ProfileMap; @@ -70,6 +76,7 @@ ProfileMap m_profiles; LastCallMap m_lastCalls; WorstCallMap m_worstCalls; +#endif static Profiles* m_instance; };