diff options
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 | 4 |
4 files changed, 13 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 439855fbb..cde328bc6 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -500,6 +500,10 @@ uint32_t _OS::get_ticks_msec() const { return OS::get_singleton()->get_ticks_msec(); } +uint32_t _OS::get_splash_tick_msec() const { + + return OS::get_singleton()->get_splash_tick_msec(); +} bool _OS::can_use_threads() const { @@ -765,6 +769,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec); ObjectTypeDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec); ObjectTypeDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec); + ObjectTypeDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec); ObjectTypeDB::bind_method(_MD("get_locale"),&_OS::get_locale); ObjectTypeDB::bind_method(_MD("get_model_name"),&_OS::get_model_name); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index f3601e35f..ea8ca9af9 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -210,6 +210,7 @@ public: void delay_usec(uint32_t p_usec) const; void delay_msec(uint32_t p_msec) const; uint32_t get_ticks_msec() const; + uint32_t get_splash_tick_msec() const; bool can_use_threads() const; diff --git a/core/os/os.cpp b/core/os/os.cpp index 5e0e5eed7..5fa7e87d0 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -43,6 +43,9 @@ OS* OS::get_singleton() { uint32_t OS::get_ticks_msec() const { return get_ticks_usec()/1000; } +uint64_t OS::get_splash_tick_msec() const { + return _msec_splash; +} uint64_t OS::get_unix_time() const { return 0; diff --git a/core/os/os.h b/core/os/os.h index d4ac43364..b52a37ede 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -51,6 +51,7 @@ class OS { String _local_clipboard; uint64_t frames_drawn; uint32_t _frame_delay; + uint64_t _msec_splash; bool _no_window; int _exit_code; int _orientation; @@ -251,6 +252,7 @@ public: virtual void delay_usec(uint32_t p_usec) const=0; virtual uint64_t get_ticks_usec() const=0; uint32_t get_ticks_msec() const; + uint64_t get_splash_tick_msec() const; void set_frame_delay(uint32_t p_msec); uint32_t get_frame_delay() const; @@ -384,6 +386,8 @@ public: void set_time_scale(float p_scale); float get_time_scale() const; + + OS(); virtual ~OS(); |
