You've already forked godot
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user