-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
This commit is contained in:
Juan Linietsky
2016-01-10 18:24:55 -03:00
parent 5b088b41b3
commit a120c66f98
8 changed files with 18 additions and 13 deletions

View File

@ -1681,10 +1681,16 @@ 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 {
uint64_t OS_Windows::get_system_time_secs() const {
SYSTEMTIME st;
GetSystemTime(&st);
return st.wMilliseconds;
FILETIME ft;
SystemTimeToFileTime(&st,&ft);
uint64_t ret;
ret=ft.dwHighDateTime;
ret<<=32;
ret|=ft.dwLowDateTime;
return ret;
}
void OS_Windows::delay_usec(uint32_t p_usec) const {