Skip to content

Commit

Permalink
Make render thread sleep when not rendering to reduce cpu load.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Reitsma committed Sep 16, 2023
1 parent a8f1c01 commit 3ef07f2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,14 @@ private void startRender() {
});
}
}
else {
// not rendering, no need to try again immediately
try {
Thread.sleep(10);
} catch (InterruptedException e) {

}
}
}
});
}
Expand Down

0 comments on commit 3ef07f2

Please sign in to comment.