···5252//The current value of the system timer, in nanoseconds.
5353__int64 System::nanoTime()
5454{
5555+#if defined _WINDOWS64 || defined _XBOX || defined _WIN32
5656+ static LARGE_INTEGER s_frequency = { 0 };
5757+ if (s_frequency.QuadPart == 0)
5858+ {
5959+ QueryPerformanceFrequency(&s_frequency);
6060+ }
6161+6262+ LARGE_INTEGER counter;
6363+ QueryPerformanceCounter(&counter);
6464+6565+ // Using double to avoid 64-bit overflow during multiplication for long uptime
6666+ // Precision is sufficient for ~100 days of uptime.
6767+ return (__int64)((double)counter.QuadPart * 1000000000.0 / (double)s_frequency.QuadPart);
6868+#else
5569 return GetTickCount() * 1000000LL;
7070+#endif
5671}
57725873//Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond,
+1
README.md
···1616- Added support for keyboard and mouse input
1717- Added fullscreen mode support (toggle using F11)
1818- Disabled V-Sync for better performance
1919+- Added a high-resolution timer path on Windows for smoother high-FPS gameplay timing
1920- Device's screen resolution will be used as the game resolution instead of using a fixed resolution (1920x1080)
20212122## Controls (Keyboard & Mouse)