Skip to content

Commit 2f26045

Browse files
committed
Common: fix compiler warnings
1 parent 40e67a1 commit 2f26045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/time.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static inline uint64_t ffTimeGetTick() //In msec
2020
#else
2121
struct timespec timeNow;
2222
clock_gettime(CLOCK_MONOTONIC, &timeNow);
23-
return (uint64_t)((timeNow.tv_sec * 1000ull) + (timeNow.tv_nsec / 1000000ull));
23+
return (uint64_t)(((uint64_t) timeNow.tv_sec * 1000u) + ((uint64_t) timeNow.tv_nsec / 1000000u));
2424
#endif
2525
}
2626

@@ -33,7 +33,7 @@ static inline uint64_t ffTimeGetNow()
3333
#else
3434
struct timespec timeNow;
3535
clock_gettime(CLOCK_REALTIME, &timeNow);
36-
return (uint64_t)((timeNow.tv_sec * 1000ull) + (timeNow.tv_nsec / 1000000ull));
36+
return (uint64_t)(((uint64_t) timeNow.tv_sec * 1000u) + ((uint64_t) timeNow.tv_nsec / 1000000u));
3737
#endif
3838
}
3939

0 commit comments

Comments
 (0)