diff options
author | volzhs <volzhs@gmail.com> | 2018-12-20 06:18:52 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2018-12-20 18:50:50 +0900 |
commit | 84d060c768c10145374d48ebd2b3f00430c73638 (patch) | |
tree | 75db8f881850f4c17b07a992e9c2e79442fbecfe /core | |
parent | 26058376aa180f70e152070b3b69272287a710a8 (diff) |
Added OS.get_system_time_msecs()
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 5 | ||||
-rw-r--r-- | core/bind/core_bind.h | 1 | ||||
-rw-r--r-- | core/os/os.cpp | 3 | ||||
-rw-r--r-- | core/os/os.h | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 8641af84d9..6f4561d8e6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -827,6 +827,10 @@ uint64_t _OS::get_system_time_secs() const { return OS::get_singleton()->get_system_time_secs(); } +uint64_t _OS::get_system_time_msecs() const { + return OS::get_singleton()->get_system_time_msecs(); +} + void _OS::delay_usec(uint32_t p_usec) const { OS::get_singleton()->delay_usec(p_usec); @@ -1182,6 +1186,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_datetime_from_unix_time", "unix_time_val"), &_OS::get_datetime_from_unix_time); ClassDB::bind_method(D_METHOD("get_unix_time_from_datetime", "datetime"), &_OS::get_unix_time_from_datetime); ClassDB::bind_method(D_METHOD("get_system_time_secs"), &_OS::get_system_time_secs); + ClassDB::bind_method(D_METHOD("get_system_time_msecs"), &_OS::get_system_time_msecs); ClassDB::bind_method(D_METHOD("set_icon", "icon"), &_OS::set_icon); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 4cdf09d522..39704286b6 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -281,6 +281,7 @@ public: Dictionary get_time_zone_info() const; uint64_t get_unix_time() const; uint64_t get_system_time_secs() const; + uint64_t get_system_time_msecs() const; int get_static_memory_usage() const; int get_static_memory_peak_usage() const; diff --git a/core/os/os.cpp b/core/os/os.cpp index 7547b6a042..ea60a03373 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -61,6 +61,9 @@ uint64_t OS::get_unix_time() const { uint64_t OS::get_system_time_secs() const { return 0; } +uint64_t OS::get_system_time_msecs() const { + return 0; +} void OS::debug_break(){ // something diff --git a/core/os/os.h b/core/os/os.h index 05ec3ac424..046686ff51 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -328,6 +328,7 @@ public: virtual TimeZoneInfo get_time_zone_info() const = 0; virtual uint64_t get_unix_time() const; virtual uint64_t get_system_time_secs() const; + virtual uint64_t get_system_time_msecs() const; virtual void delay_usec(uint32_t p_usec) const = 0; virtual uint64_t get_ticks_usec() const = 0; |