提交 202d9fc1 编写于 作者: Z Zhang Rui

ijksdl: add SDL_GetTickHR()

上级 3e67c711
......@@ -39,3 +39,12 @@ void SDL_Delay(Uint32 ms)
was_error = nanosleep(&tv, &elapsed);
} while (was_error);
}
Uint64 SDL_GetTickHR(void)
{
Uint64 clock;
struct timespec now;
clock_gettime(CLOCK_MONOTONIC_HR, &now);
clock = now.tv_sec * 1000 + now.tv_nsec * 1000000;
return (clock);
}
......@@ -28,4 +28,6 @@
void SDL_Delay(Uint32 ms);
Uint64 SDL_GetTickHR(void);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册