Ensure UNIX implementations of PltGetMillis() are not limited to 32 bits
This commit is contained in:
parent
6d767a8494
commit
b282c7e603
1 changed files with 2 additions and 2 deletions
|
|
@ -401,13 +401,13 @@ uint64_t PltGetMillis(void) {
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &tv);
|
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
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
|
|
||||||
return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
return ((uint64_t)tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue