This commit is contained in:
Caspian Rychlik-Prince 2004-05-05 14:34:26 +00:00
parent 2c39ddfd0b
commit 88ff0562a8
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ public final class Display {
public static void sync(int fps) {
float frameTime = 1.0f / (float) fps;
timeNow = Sys.getTime();
while (timeNow > timeThen && (float) (timeNow - timeThen) / (float) Sys.getTimerResolution() < frameRate) {
while (timeNow > timeThen && (float) (timeNow - timeThen) / (float) Sys.getTimerResolution() < frameTime) {
// This is a system-friendly way of allowing other stuff to use CPU if it wants to
Thread.yield();
timeNow = Sys.getTime();