Files
gpd-925-en/GraphicsProgramming/D3D11/Time.cpp
T
david d2a487a4f6 Added: matrix buffer
Added: world, view & projection matrices
Added: delta time calculation
Added: quad mesh
2026-10-12 18:47:53 +02:00

28 lines
480 B
C++

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