You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #32463 from Kanabenki/fix-time-cast
Fix casting to uint64_t when returning unix system time
This commit is contained in:
@@ -187,7 +187,7 @@ uint64_t OS_Unix::get_system_time_secs() const {
|
|||||||
uint64_t OS_Unix::get_system_time_msecs() const {
|
uint64_t OS_Unix::get_system_time_msecs() const {
|
||||||
struct timeval tv_now;
|
struct timeval tv_now;
|
||||||
gettimeofday(&tv_now, NULL);
|
gettimeofday(&tv_now, NULL);
|
||||||
return uint64_t(tv_now.tv_sec * 1000 + tv_now.tv_usec / 1000);
|
return uint64_t(tv_now.tv_sec) * 1000 + uint64_t(tv_now.tv_usec) / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
OS::Date OS_Unix::get_date(bool utc) const {
|
OS::Date OS_Unix::get_date(bool utc) const {
|
||||||
|
|||||||
Reference in New Issue
Block a user