add fps output
This commit is contained in:
+13
-1
@@ -1,4 +1,8 @@
|
|||||||
#include "Time.h"
|
#include "Time.h"
|
||||||
|
#if _DEBUG
|
||||||
|
#include <string>
|
||||||
|
#endif // _DEBUG
|
||||||
|
|
||||||
|
|
||||||
UINT Time::init()
|
UINT Time::init()
|
||||||
{
|
{
|
||||||
@@ -14,7 +18,15 @@ void Time::update()
|
|||||||
_lastFrame = now;
|
_lastFrame = now;
|
||||||
_deltaTime = diff.count();
|
_deltaTime = diff.count();
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#ifdef UNICODE
|
||||||
|
wstring output = L"fps: " + to_wstring(1 / _deltaTime) + L"\n";
|
||||||
|
OutputDebugString(output.c_str());
|
||||||
|
#else // !UNICODE
|
||||||
|
string output = "fps: " + to_string(1 / _deltaTime) + "\n";
|
||||||
|
OutputDebugString(output.c_str());
|
||||||
|
#endif // UNICODE
|
||||||
|
#endif // DEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
void Time::deInit()
|
void Time::deInit()
|
||||||
|
|||||||
Reference in New Issue
Block a user