diff options
Diffstat (limited to 'src/video/video_driver.hpp')
-rw-r--r-- | src/video/video_driver.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index 94803db22..732050c76 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -13,7 +13,9 @@ #include "../driver.h" #include "../core/geometry_type.hpp" #include "../core/math_func.hpp" +#include "../settings_type.h" #include "../zoom_type.h" +#include <chrono> #include <vector> extern std::string _ini_videodriver; @@ -153,6 +155,16 @@ protected: _cur_resolution.height = ClampU(res.height * 3 / 4, DEFAULT_WINDOW_HEIGHT, UINT16_MAX / 2); } } + + std::chrono::steady_clock::duration GetGameInterval() + { + return std::chrono::milliseconds(MILLISECONDS_PER_TICK); + } + + std::chrono::steady_clock::duration GetDrawInterval() + { + return std::chrono::microseconds(1000000 / _settings_client.gui.refresh_rate); + } }; #endif /* VIDEO_VIDEO_DRIVER_HPP */ |