PerformanceTimer will no longer run while in release
This commit is contained in:
@@ -2,8 +2,11 @@
|
|||||||
#define PerformanceTimer_h__
|
#define PerformanceTimer_h__
|
||||||
|
|
||||||
#include "../Common.h"
|
#include "../Common.h"
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
#include <boost/timer/timer.hpp>
|
#include <boost/timer/timer.hpp>
|
||||||
using boost::timer::cpu_timer;
|
using boost::timer::cpu_timer;
|
||||||
|
#endif //DEBUG
|
||||||
|
|
||||||
class PerformanceTimer
|
class PerformanceTimer
|
||||||
{
|
{
|
||||||
@@ -17,9 +20,11 @@ public:
|
|||||||
static void CreateExcelData();
|
static void CreateExcelData();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
#ifdef DEBUG
|
||||||
static std::map<std::string, cpu_timer> timers;
|
static std::map<std::string, cpu_timer> timers;
|
||||||
static cpu_timer m_Timer;
|
static cpu_timer m_Timer;
|
||||||
static std::string currentTimerRunning;
|
static std::string currentTimerRunning;
|
||||||
|
#endif //DEBUG
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#include "Core/PerformanceTimer.h"
|
#include "Core/PerformanceTimer.h"
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
cpu_timer PerformanceTimer::m_Timer;
|
cpu_timer PerformanceTimer::m_Timer;
|
||||||
std::map<std::string, cpu_timer> PerformanceTimer::timers;
|
std::map<std::string, cpu_timer> PerformanceTimer::timers;
|
||||||
std::string PerformanceTimer::currentTimerRunning = "";
|
std::string PerformanceTimer::currentTimerRunning = "";
|
||||||
@@ -74,3 +77,15 @@ void PerformanceTimer::CreateExcelData()
|
|||||||
}
|
}
|
||||||
someFileStream.close();
|
someFileStream.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void PerformanceTimer::StartTimer(std::string nameOfTimer) {};
|
||||||
|
void PerformanceTimer::StartTimerAndStopPrevious(std::string nameOfTimer) {};
|
||||||
|
void PerformanceTimer::StopTimer(std::string nameOfTimer) {};
|
||||||
|
void PerformanceTimer::SetFrameNumber(int frameNumber) {};
|
||||||
|
|
||||||
|
void PerformanceTimer::ResetAllTimers() {};
|
||||||
|
void PerformanceTimer::CreateExcelData() {};
|
||||||
|
|
||||||
|
#endif //DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user