while(true) {}

Ever wondered about the 90 percent CPU utilisation when it’s just supposed to wait for something?

Maybe it’s the case that you find something similar like that in your code:

Well that was the part of the code that produced 90 percent CPU utilisation, doing just nothing in a little testing server I am working with at the moment…

Just by inserting a Thread.sleep(sleepTime); the utilisation drops to zero.