mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-16 16:28:13 +00:00
Don't assume evdev events and SDL_GetTicks() use the same time source
The evdev events are in the same time base as gettimeofday(), but SDL_GetTicks() might be using clock_gettime()
This commit is contained in:
@@ -565,22 +565,6 @@ void SDL_TicksQuit(void)
|
||||
tick_start = 0;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetTickStartNS(void)
|
||||
{
|
||||
Uint64 starting_value, value;
|
||||
|
||||
if (!tick_start) {
|
||||
SDL_TicksInit();
|
||||
}
|
||||
|
||||
starting_value = tick_start;
|
||||
value = (starting_value * tick_numerator_ns);
|
||||
SDL_assert(value >= starting_value);
|
||||
value /= tick_denominator_ns;
|
||||
return value;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetTicksNS(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user