#pragma once #include #include #include "typedef.h" const U32 TICK_RESOLUTION = 1000000; inline U64 u_tick() { return (SDL_GetPerformanceCounter() * TICK_RESOLUTION / SDL_GetPerformanceFrequency()); } inline F32 u_time() { return (F32)((F64)u_tick() / TICK_RESOLUTION); } inline F64 u_time64() { return (F64)u_tick() / TICK_RESOLUTION; }