summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-10-01 12:24:14 +0200
committerGitHub <noreply@github.com>2019-10-01 12:24:14 +0200
commit5fa6f9d7ff7d1f7eec19d1e97b58b92526b0cd9d (patch)
tree6e31bc29ece6ec5b6af7006e1c90def14264714e /drivers/unix/os_unix.cpp
parent79298face0d7dc53b3c014ac910212a5993c1d1c (diff)
parentadd91724e694dd4e5d26e232d925fcbe12a5ad37 (diff)
downloadredot-engine-5fa6f9d7ff7d1f7eec19d1e97b58b92526b0cd9d.tar.gz
Merge pull request #32463 from Kanabenki/fix-time-cast
Fix casting to uint64_t when returning unix system time
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 80d7a2ccaa..b3d98a0648 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -187,7 +187,7 @@ uint64_t OS_Unix::get_system_time_secs() const {
uint64_t OS_Unix::get_system_time_msecs() const {
struct timeval tv_now;
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 {