From b282c7e6037338c19e2d10eb2ebec7c761716763 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 21 Oct 2022 17:44:43 -0500 Subject: [PATCH] Ensure UNIX implementations of PltGetMillis() are not limited to 32 bits --- src/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Platform.c b/src/Platform.c index 170bffb..365ea77 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -401,13 +401,13 @@ uint64_t PltGetMillis(void) { clock_gettime(CLOCK_MONOTONIC, &tv); - return (tv.tv_sec * 1000) + (tv.tv_nsec / 1000000); + return ((uint64_t)tv.tv_sec * 1000) + (tv.tv_nsec / 1000000); #else struct timeval tv; gettimeofday(&tv, NULL); - return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); + return ((uint64_t)tv.tv_sec * 1000) + (tv.tv_usec / 1000); #endif }