2025-07-30 17:49 UTC
@nazokiyoubinbou@urusai.social Yeah but it's an easy thing to miss:
1. We want to measure how fast the CPU is, so lets write a loop to see how many milliseconds this long operation takes
2. Lets now divide some constant value by the number of milliseconds to get a calibration value that we can use to keep the game running at a constant speed
3. Division by 0?? How did that happen? (the loop was so fast that it ran in less than 1 ms)
Replies (1)
-
@Bwaz@mastodon.online 2025-07-30 18:11
@TomGwozdz@oldbytes.space @nazokiyoubinbou@urusai.social I remember that. Drove me nuts when I first ran across it.