diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-08 17:32:11 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-08 17:32:11 +0100 |
commit | cc1b36f4f0a20695bcfc5c16c853cb32312fe70c (patch) | |
tree | 17c68e571f80d7d2ce39da99002608fff35f6f5a /src/crepe/manager/LoopTimerManager.cpp | |
parent | 3467c96eff775fccb24a6ecd7c15a7f42660a7ff (diff) |
added scaled fixed delta time
Diffstat (limited to 'src/crepe/manager/LoopTimerManager.cpp')
-rw-r--r-- | src/crepe/manager/LoopTimerManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/crepe/manager/LoopTimerManager.cpp b/src/crepe/manager/LoopTimerManager.cpp index e30b90d..5d4545f 100644 --- a/src/crepe/manager/LoopTimerManager.cpp +++ b/src/crepe/manager/LoopTimerManager.cpp @@ -82,3 +82,10 @@ void LoopTimerManager::enforce_frame_rate() { double LoopTimerManager::get_lag() const { return (this->elapsed_time - this->elapsed_fixed_time).count(); } +double LoopTimerManager::get_scaled_fixed_delta_time() const{ + return this->fixed_delta_time.count() * this->time_scale; +} +void LoopTimerManager::set_fixed_delta_time(int seconds) { + this->fixed_delta_time = std::chrono::duration<double>(seconds); +} + |