summaryrefslogtreecommitdiff
path: root/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app.cpp')
-rw-r--r--app.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/app.cpp b/app.cpp
index 95f730b..0f57a71 100644
--- a/app.cpp
+++ b/app.cpp
@@ -515,6 +515,7 @@ int WinMain(
#endif
void App::init(const char* name) {
+ dt = 0.0f;
internal = (App_Internal*)arena_alloc(
arena,
sizeof *internal
@@ -536,6 +537,7 @@ void App::destroy() {
void App::begin() {
int j;
+ begin_t = get_time();
for (j = 0; j < key_count; j++)
key_states[j] &= ~(
key_state_just_pressed | key_state_just_released
@@ -548,6 +550,8 @@ void App::begin() {
}
void App::end() {
+ end_t = get_time();
+ dt = (float)((double)(end_t - begin_t) / 1000000000.0);
internal->end(this);
}