Added static class PerformanceTimer. Changed CMakeLists for engine to include boost timer. Added F2,F3 functions in editor. Added some timing, more to be added

This commit is contained in:
verysecrethero
2016-02-16 16:57:46 +01:00
parent 969e7cb0d5
commit 4b8f1d95a3
8 changed files with 154 additions and 5 deletions
+36
View File
@@ -0,0 +1,36 @@
#ifndef PerformanceTimer_h__
#define PerformanceTimer_h__
#include <array>
#include <GLFW/glfw3.h>
#include "../Common.h"
#include <boost/timer/timer.hpp>
using boost::timer::cpu_timer;
class PerformanceTimer
{
public:
static void StartTimer(std::string nameOfTimer);
static void StartTimerAndStopPrevious(std::string nameOfTimer);
static void StopTimer(std::string nameOfTimer);
static void SetFrameNumber(int frameNumber);
static void ResetAllTimers();
static void CreateExcelData();
//set timer/start
//get performance excel nånting
private:
static std::map<std::string, cpu_timer> timers;
static double m_TimeElapsed;
static cpu_timer m_Timer;
static std::string currentTimerRunning;
static bool active;
//static map
};
#endif