Mercurial > hg > svcore
diff base/Profiler.h @ 1221:a1b97df9962e 3.0-integration
Merge from branch msvc2015_64
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 11:16:22 +0100 |
parents | c811991a5efa |
children | ad5f892c0c4d |
line wrap: on
line diff
--- a/base/Profiler.h Tue Oct 18 14:03:35 2016 +0100 +++ b/base/Profiler.h Thu Oct 20 11:16:22 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; };