how i can limit game loop time

Hi all!)
I have a problem. My game loop gives all available fps from processor - how i can limit it, that i had non constant fps and not 100% of processor used same time?

If your using LWJGL have a read of the timing tutorial but generally the same technique should apply for non LWJGL java games. You need to use either Thread.sleep() or the Display.sync() method.

thanks for article - by some reason don’t saw it previously, but

Display.sync(60); // cap fps to 60fps
i’m trying to find way without cap. But it is also helpfull.