Fix 64-bit timeval/timespec delta calculations

This commit is contained in:
Brick
2021-11-02 22:17:41 +00:00
committed by Sam Lantinga
parent 6d5edfa733
commit 62629c2b5d
2 changed files with 3 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ SDL_GetTicks64(void)
}
gettimeofday(&now, NULL);
return (((Uint64)(now.tv_sec-start.tv_sec)) * 1000) + (((Uint64) (now.tv_usec-start.tv_usec)) / 1000);
return (Uint64) (((Sint64) (now.tv_sec - start.tv_sec) * 1000) + ((now.tv_usec - start.tv_usec) / 1000));
}
Uint64