feat: added time_seconds
This commit is contained in:
		
							parent
							
								
									d680ebf55f
								
							
						
					
					
						commit
						08e21f0568
					
				|  | @ -2,6 +2,7 @@ | |||
| #define UTILS_FUNCTIONS_HPP | ||||
| 
 | ||||
| #include <godot_cpp/variant/dictionary.hpp> | ||||
| #include <godot_cpp/classes/time.hpp> | ||||
| #include <godot_cpp/templates/hash_map.hpp> | ||||
| 
 | ||||
| namespace utils { | ||||
|  | @ -21,6 +22,11 @@ godot::HashMap<T, U> 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
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Sara
						Sara