2016-09-25 13:21:54 +00:00
|
|
|
#ifndef PERFORMANCE_H
|
|
|
|
#define PERFORMANCE_H
|
2017-06-09 21:23:30 +00:00
|
|
|
#include <chrono>
|
2016-09-25 13:21:54 +00:00
|
|
|
#include "Types.h"
|
|
|
|
|
|
|
|
class Performance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Performance();
|
|
|
|
void reset();
|
|
|
|
f32 getFps() const;
|
|
|
|
f32 getVIs() const;
|
|
|
|
f32 getPercent() const;
|
|
|
|
void increaseVICount();
|
|
|
|
void increaseFramesCount();
|
|
|
|
|
|
|
|
private:
|
|
|
|
u32 m_vi;
|
|
|
|
u32 m_frames;
|
|
|
|
f32 m_fps;
|
|
|
|
f32 m_vis;
|
2017-06-09 21:23:30 +00:00
|
|
|
std::chrono::steady_clock::time_point m_startTime;
|
2016-10-10 05:34:36 +00:00
|
|
|
bool m_enabled;
|
2016-09-25 13:21:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Performance perf;
|
|
|
|
#endif // PERFORMANCE_H
|