is my game loop right? :S
public void run() {
while (running) {
long time = System.currentTimeMillis();
update();
render();
draw();
long deltaTime = System.currentTimeMillis() - time;
time = fps - deltaTime;
currentFps = time;
if (time > 0) {
try {
Thread.sleep(time);
} catch (Exception e) {
System.out.println(e);
}
}
}
setVisible(false);
}
fps is set to 60