summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-10 18:24:55 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-10 18:24:55 -0300
commita120c66f98586138fc61fa6f243cb071d60111bc (patch)
tree61deb7f8b8443bee3e028ad9ae347496eea4e458 /core
parent5b088b41b3147cc19f2d5bc56b762bd5988bc484 (diff)
-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')
-rw-r--r--core/bind/core_bind.cpp6
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/os/os.cpp2
-rw-r--r--core/os/os.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index fba3e7ca09..f951237971 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 8ab8878119..62572d7761 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;
diff --git a/core/os/os.cpp b/core/os/os.cpp
index eb5f91167a..1a505fb236 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -50,7 +50,7 @@ uint64_t OS::get_unix_time() const {
return 0;
};
-uint64_t OS::get_system_time_msec() const {
+uint64_t OS::get_system_time_secs() const {
return 0;
}
void OS::debug_break() {
diff --git a/core/os/os.h b/core/os/os.h
index 94cb1d4ea4..711743f23a 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -256,7 +256,7 @@ public:
virtual Time get_time(bool local=false) const=0;
virtual TimeZoneInfo get_time_zone_info() const=0;
virtual uint64_t get_unix_time() const;
- virtual uint64_t get_system_time_msec() const;
+ virtual uint64_t get_system_time_secs() const;
virtual void delay_usec(uint32_t p_usec) const=0;
virtual uint64_t get_ticks_usec() const=0;