aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopTimer.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 19:49:41 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 19:49:41 +0100
commit519cc5d16e65ff501d330c03eeb35d2d095ead29 (patch)
tree3c7c3a64c922ec248f4136d1282530a6ec6647ac /src/crepe/api/LoopTimer.h
parent63bcd54e0e0ea64cfef5950568b4253d5dae5c1e (diff)
made sdlcontext not a singleton anymore
Diffstat (limited to 'src/crepe/api/LoopTimer.h')
-rw-r--r--src/crepe/api/LoopTimer.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/crepe/api/LoopTimer.h b/src/crepe/api/LoopTimer.h
index 9393439..2a0b2a5 100644
--- a/src/crepe/api/LoopTimer.h
+++ b/src/crepe/api/LoopTimer.h
@@ -1,18 +1,14 @@
#pragma once
+#include "manager/Manager.h"
#include <chrono>
namespace crepe {
-class LoopTimer {
-public:
- /**
- * \brief Get the singleton instance of LoopTimer.
- *
- * \return A reference to the LoopTimer instance.
- */
- static LoopTimer & get_instance();
+class Mediator;
+class LoopTimer : public Manager {
+public:
/**
* \brief Get the current delta time for the current frame.
*
@@ -102,7 +98,7 @@ private:
*
* Private constructor for singleton pattern to restrict instantiation outside the class.
*/
- LoopTimer();
+ LoopTimer(Mediator & mediator);
/**
* \brief Update the timer to the current frame.