diff base/Profiler.h @ 1365:3382d914e110

Merge from branch 3.0-integration
author Chris Cannam
date Fri, 13 Jan 2017 10:29:44 +0000
parents c811991a5efa
children ad5f892c0c4d
line wrap: on
line diff
--- a/base/Profiler.h	Mon Nov 21 16:32:58 2016 +0000
+++ b/base/Profiler.h	Fri Jan 13 10:29:44 2017 +0000
@@ -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;
 };