Files
hwr2023_a/GDP/D3D11/Time.h
T
2025-12-03 15:50:25 +01:00

25 lines
378 B
C++

#pragma once
#include <Windows.h>
#include <chrono>
using namespace std;
typedef chrono::steady_clock CLOCK;
typedef CLOCK::time_point TIME_POINT;
typedef chrono::duration<FLOAT> SECONDS;
class Time
{
public:
UINT init();
void update();
void deInit();
FLOAT getDeltaTime() const { return _deltaTime; }
private:
FLOAT _deltaTime = 0.0f;
TIME_POINT _lastTime = {};
};