From 6b8a5213e64f85147fc47b44859fd2c895608635 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Wed, 18 Oct 2023 19:00:08 +0200 Subject: [PATCH] - [NEW] game::getTicks() --- source/jgame.cpp | 6 ++++++ source/jgame.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/source/jgame.cpp b/source/jgame.cpp index 437f1c2..816805f 100644 --- a/source/jgame.cpp +++ b/source/jgame.cpp @@ -29,6 +29,12 @@ namespace game { return config[key]; } + + const uint32_t getTicks() + { + return SDL_GetTicks(); + } + } int main(int argc, char *argv[]) diff --git a/source/jgame.h b/source/jgame.h index 2420c86..7b09e2a 100644 --- a/source/jgame.h +++ b/source/jgame.h @@ -15,4 +15,6 @@ namespace game void setConfig(const char* key, const int value); const int getConfig(const char* key); + + const uint32_t getTicks(); }