18 static inline uint64_t getSDLTicks()
20 return static_cast<uint64_t
>(SDL_GetTicks()) * 1000;
25 static uint64_t lastTime = 0;
49 #if HAVE_CLOCK_GETTIME && defined(_POSIX_MONOTONIC_CLOCK)
53 int result = clock_gettime(CLOCK_MONOTONIC, &ts);
54 assert(result == 0); (void)result;
55 now =
static_cast<uint64_t
>(ts.tv_sec) * 1000000 +
56 static_cast<uint64_t>(ts.tv_nsec) / 1000;
101 SDL_Delay(
unsigned(us / 1000));