diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-12 18:18:29 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-12 18:18:29 +0100 |
commit | 6a83afb0da8abb7a6db068dbf4e885617b71383e (patch) | |
tree | a3fbde5cd940a5b2a113ec6ad428ea383245c80a /src/crepe/facade/SDLContext.h | |
parent | c926205fa73bfbc15fd184de512db7092daefe95 (diff) | |
parent | d8ab8df9e61d908348a25d9556ec2e8c19656315 (diff) |
Merge branch 'wouter/LoopManager-new' of github.com:lonkaars/crepe
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r-- | src/crepe/facade/SDLContext.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h index e358c21..536dec5 100644 --- a/src/crepe/facade/SDLContext.h +++ b/src/crepe/facade/SDLContext.h @@ -58,12 +58,23 @@ private: private: //! Will only use get_ticks friend class AnimatorSystem; - + //! Will only use delay + friend class LoopTimer; /** * \brief Gets the current SDL ticks since the program started. * \return Current ticks in milliseconds as a constant uint64_t. */ uint64_t get_ticks() const; + /** + * \brief Pauses the execution for a specified duration. + * + * This function uses SDL's delay function to halt the program execution + * for a given number of milliseconds, allowing for frame rate control + * or other timing-related functionality. + * + * \param ms Duration of the delay in milliseconds. + */ + void delay(int ms) const; private: /** |