Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
theyareonit committed Jul 24, 2024
1 parent 2534a8a commit 824c332
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void limitDisplayFPS(int fps) {

for (; now < target; now = GLFW.glfwGetTime()) {
double waitTime = (target - now) - 0.002; // -2ms to account for inaccuracy of timeouts on some operating systems
if (waitTime >= 0.001) { // pretty sure you can't sleep for less than 1ms on Windows or Linux
if (waitTime >= 0.001) { // pretty sure you can't sleep for less than 1ms without platform-specific code
GLFW.glfwWaitEventsTimeout(waitTime); // could be replaced with Thread.sleep(), but i'm not sure if it'd be as precise
}
}
Expand Down

0 comments on commit 824c332

Please sign in to comment.