Files
hwr2024_b/GDP/D3D11/Time.cpp
T
2026-11-23 13:32:53 +01:00

29 lines
442 B
C++

#include "Time.h"
#include <string>
UINT Time::init()
{
_lastFrame = CLOCK::now();
return 0;
}
void Time::update()
{
TIMEPOINT now = CLOCK::now();
SECONDS diff = now - _lastFrame;
_deltaTime = diff.count();
_lastFrame = now;
#if _DEBUG && UNICODE
wstring output = L"fps: " + to_wstring(1.0f / _deltaTime) + L"\n";
OutputDebugString(output.c_str());
#endif // _DEBUG && UNICODE
}
void Time::deInit()
{
}