Files
hwr2024_a/GDP/D3D9/Time.cpp
T
david b84f9c1052 Add transformation
Add input
Add time
Add vertex colors
2026-11-16 12:10:00 +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()
{
}