aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopTimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/LoopTimer.cpp')
-rw-r--r--src/crepe/api/LoopTimer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crepe/api/LoopTimer.cpp b/src/crepe/api/LoopTimer.cpp
index 98ce08d..aaba8b3 100644
--- a/src/crepe/api/LoopTimer.cpp
+++ b/src/crepe/api/LoopTimer.cpp
@@ -1,10 +1,14 @@
#include "../facade/SDLContext.h"
+#include "../util/log.h"
#include "LoopTimer.h"
using namespace crepe;
-LoopTimer::LoopTimer() {}
+
+LoopTimer::LoopTimer() {
+ dbg_trace();
+}
LoopTimer & LoopTimer::get_instance() {
static LoopTimer instance;
@@ -55,4 +59,5 @@ void LoopTimer::enforce_frame_rate() {
SDLContext::get_instance().delay(delay_time);
}
}
+
double LoopTimer::get_lag() const { return elapsed_time - elapsed_fixed_time; }