Fixed Fps limit

This commit is contained in:
Pc
2025-01-16 23:59:40 +01:00
parent cfb3f12ef4
commit bea13b98f3
2 changed files with 18 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ public:
auto currentTime = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = currentTime - lastTime;
// Aktualizujemy FPS co 1 sekundê
if (elapsed.count() >= 1.0) {
double fps = frameCount / elapsed.count();
std::cout << "FPS: " << fps << std::endl;