1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00
Files
godot/platform/uwp/os_uwp.cpp
lawnjelly db9fa88160 Fix overflow condition with QueryPerformanceCounter
The previous code for OS_Windows::get_ticks_usec() multiplied the tick count by 1000000 before dividing by ticks_per_second. The ticks is counted in a 64 bit integer and is susceptible to overflow when a machine has been running for a long period of time (days) with a high frequency timer.

This PR separates the overall calculation into one for seconds and one for the remainder, removing the possibility of overflow due to the multiplier.
2020-05-22 12:46:35 +01:00

23 KiB