diff options
| author | Juan Linietsky | 2016-01-10 18:24:55 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-01-10 18:24:55 -0300 |
| commit | a120c66f98586138fc61fa6f243cb071d60111bc (patch) | |
| tree | 61deb7f8b8443bee3e028ad9ae347496eea4e458 /core/bind | |
| parent | 5b088b41b3147cc19f2d5bc56b762bd5988bc484 (diff) | |
| download | godot-a120c66f98586138fc61fa6f243cb071d60111bc.tar.gz godot-a120c66f98586138fc61fa6f243cb071d60111bc.tar.zst godot-a120c66f98586138fc61fa6f243cb071d60111bc.zip | |
-Removed OS.get_system_time_msec(), this is undoable on Windows and also unusable from GDscript due to precision.
-Added, instead an OS.get_system_time_secs(), which is 32 bits friendly, fixes #3143
Diffstat (limited to 'core/bind')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index fba3e7ca0..f95123797 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -494,8 +494,8 @@ uint64_t _OS::get_unix_time() const { return OS::get_singleton()->get_unix_time(); }; -uint64_t _OS::get_system_time_msec() const { - return OS::get_singleton()->get_system_time_msec(); +uint64_t _OS::get_system_time_secs() const { + return OS::get_singleton()->get_system_time_secs(); } void _OS::delay_usec(uint32_t p_usec) const { @@ -810,7 +810,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_time","utc"),&_OS::get_time,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("get_time_zone_info"),&_OS::get_time_zone_info); ObjectTypeDB::bind_method(_MD("get_unix_time"),&_OS::get_unix_time); - ObjectTypeDB::bind_method(_MD("get_system_time_msec"), &_OS::get_system_time_msec); + ObjectTypeDB::bind_method(_MD("get_system_time_secs"), &_OS::get_system_time_secs); ObjectTypeDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 8ab887811..62572d776 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -208,7 +208,7 @@ public: Dictionary get_time(bool utc) const; Dictionary get_time_zone_info() const; uint64_t get_unix_time() const; - uint64_t get_system_time_msec() const; + uint64_t get_system_time_secs() const; int get_static_memory_usage() const; int get_static_memory_peak_usage() const; |
