aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 15:44:46 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 15:44:46 +0100
commit2d07c0dc6bec17ea9f60d4c22669456f6aad52d7 (patch)
tree629d03f93390fec099840b563922fc99387f2278 /src/crepe/facade/SDLContext.h
parent9ce53b197953e66189febeaa434255b848647993 (diff)
parentf2509e89c02894ebd3ad992324eb300103621d26 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/events
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h13
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:
/**