summaryrefslogtreecommitdiff
path: root/engine/src
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src')
-rw-r--r--engine/src/Clock.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/engine/src/Clock.cpp b/engine/src/Clock.cpp
new file mode 100644
index 0000000..5261603
--- /dev/null
+++ b/engine/src/Clock.cpp
@@ -0,0 +1,33 @@
+#include <kurator/engine/Clock.h>
+
+#include <raylib.h>
+
+
+namespace kurator
+{
+namespace engine
+{
+
+
+float
+Clock::dt() const
+{
+ return GetFrameTime() * time_factor;
+}
+
+
+float
+Clock::ui() const
+{
+ return GetFrameTime();
+}
+
+
+Clock::operator float() const
+{
+ return dt();
+}
+
+
+} // namespace engine
+} // namespace kurator