From 7ef78e87c1b4160aa55d943745dc999fdca5a5ff Mon Sep 17 00:00:00 2001 From: Kanabenki <18357657+Kanabenki@users.noreply.github.com> Date: Tue, 1 Oct 2019 11:44:26 +0200 Subject: [PATCH] Fix casting to uint64_t when returning unix system time (cherry picked from commit add91724e694dd4e5d26e232d925fcbe12a5ad37) --- drivers/unix/os_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 2778590658e..367636fad60 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -206,7 +206,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 {