diff options
-rw-r--r-- | application/main.cpp | 2 | ||||
-rw-r--r-- | game/worldobject.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/application/main.cpp b/application/main.cpp index 38874f4..e70eae3 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -97,7 +97,7 @@ public: while (isRunning) { processInputs(); const auto t_end = std::chrono::high_resolution_clock::now(); - const auto t_passed = std::chrono::duration_cast<std::chrono::milliseconds>(t_end - t_start); + const auto t_passed = std::chrono::duration_cast<WorldObject::TickDuration>(t_end - t_start); world.apply(&WorldObject::tick, t_passed); world.apply<CameraController>(&CameraController::updateCamera, &camera, &shader); diff --git a/game/worldobject.h b/game/worldobject.h index 6c75b8a..db69532 100644 --- a/game/worldobject.h +++ b/game/worldobject.h @@ -6,7 +6,7 @@ class WorldObject { public: - using TickDuration = std::chrono::milliseconds; + using TickDuration = std::chrono::duration<float, std::chrono::seconds::period>; WorldObject() = default; virtual ~WorldObject() = default; |