From 08e21f0568fd4a230e46b5e1c9ab3ae48358f57c Mon Sep 17 00:00:00 2001 From: Sara Date: Tue, 11 Jun 2024 09:10:40 +0200 Subject: [PATCH] feat: added time_seconds --- util_functions.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util_functions.hpp b/util_functions.hpp index fd67177..cce76bc 100644 --- a/util_functions.hpp +++ b/util_functions.hpp @@ -2,6 +2,7 @@ #define UTILS_FUNCTIONS_HPP #include +#include #include namespace utils { @@ -21,6 +22,11 @@ godot::HashMap dictionary_to_hashmap(godot::Dictionary const &dict) { map.insert(keys[i], dict[keys[i]]); return map; } + +static inline +double time_seconds() { + return double(godot::Time::get_singleton()->get_ticks_msec()) * 0.001; +} } #endif // !UTILS_FUNCTIONS_HPP