You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
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.
(cherry picked from commit db9fa88160)
25 KiB
25 KiB