Starting the game loop

This commit is contained in:
Zoe Roux
2021-05-14 17:46:14 +02:00
parent d6aaf30c3b
commit 2015705f11
3 changed files with 12 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
// Created by Zoe Roux on 2021-05-14.
//
#include <chrono>
#include "Wal.hpp"
namespace WAL
@@ -14,6 +15,13 @@ namespace WAL
void WAL::run()
{
auto lastTick = std::chrono::steady_clock::now();
while (!this->_shouldClose) {
auto now = std::chrono::steady_clock::now();
auto dtime = now - lastTick;
lastTick = now;
// see https://gist.github.com/mariobadr/673bbd5545242fcf9482
}
}
}