mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Attempt to reduce CPU usage a bit with new update loop
This commit is contained in:
parent
4bac15d704
commit
4641ea3d38
1 changed files with 7 additions and 0 deletions
|
|
@ -532,6 +532,13 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
|
|||
this.mainInputLoop();
|
||||
this.mainRedrawWrapper();
|
||||
lastDrawTime = currentTime;
|
||||
|
||||
if (VARIABLE_RENDER_RATE > minimumDelay) {
|
||||
timer.sleep(minimumDelay, (int) VARIABLE_RENDER_RATE);
|
||||
} else {
|
||||
// encourage thread switching
|
||||
Thread.yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (@Pc(198) Exception ex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue