1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

-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

@@ -233,13 +233,12 @@ uint64_t OS_Unix::get_unix_time() const {
return time(NULL);
};
uint64_t OS_Unix::get_system_time_msec() const {
uint64_t OS_Unix::get_system_time_secs() const {
struct timeval tv_now;
gettimeofday(&tv_now, NULL);
//localtime(&tv_now.tv_usec);
//localtime((const long *)&tv_now.tv_usec);
uint64_t msec = uint64_t(tv_now.tv_sec)*1000+tv_now.tv_usec/1000;
return msec;
return uint64_t(tv_now.tv_sec);
}