summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp6
-rw-r--r--platform/windows/os_windows.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index ec9e17c4f0..87d9a43d8c 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1899,6 +1899,12 @@ uint64_t OS_Windows::get_unix_time() const {
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
};
+uint64_t OS_Windows::get_system_time_msec() const {
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+ return st.wMilliseconds;
+}
+
void OS_Windows::delay_usec(uint32_t p_usec) const {
if (p_usec < 1000)
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 31e030d02e..cce94f5b25 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -263,6 +263,7 @@ public:
virtual Time get_time(bool utc) const;
virtual TimeZoneInfo get_time_zone_info() const;
virtual uint64_t get_unix_time() const;
+ virtual uint64_t get_system_time_msec() const;
virtual bool can_draw() const;
virtual Error set_cwd(const String& p_cwd);
@@ -272,7 +273,7 @@ public:
virtual Error execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id=NULL,String* r_pipe=NULL,int *r_exitcode=NULL);
virtual Error kill(const ProcessID& p_pid);
-
+
virtual bool has_environment(const String& p_var) const;
virtual String get_environment(const String& p_var) const;