mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Fixed warning: result of comparison of constant 9223372035 with expression of type '__kernel_old_time_t' (aka 'long') is always true
This commit is contained in:
@@ -107,7 +107,7 @@ int SDL_GetCurrentTime(SDL_Time *ticks)
|
|||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
|
|
||||||
if (clock_gettime(CLOCK_REALTIME, &tp) == 0) {
|
if (clock_gettime(CLOCK_REALTIME, &tp) == 0) {
|
||||||
tp.tv_sec = SDL_min(tp.tv_sec, SDL_NS_TO_SECONDS(SDL_MAX_TIME) - 1);
|
//tp.tv_sec = SDL_min(tp.tv_sec, SDL_NS_TO_SECONDS(SDL_MAX_TIME) - 1);
|
||||||
*ticks = SDL_SECONDS_TO_NS(tp.tv_sec) + tp.tv_nsec;
|
*ticks = SDL_SECONDS_TO_NS(tp.tv_sec) + tp.tv_nsec;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user