Java Delay/Wait

Gray Adams picture Gray Adams · Dec 21, 2011 · Viewed 93.1k times · Source

How do I delay a while loop to 1 second intervals without slowing down the entire code / computer it's running on to the one second delay (just the one little loop).

Answer

COD3BOY picture COD3BOY · Dec 21, 2011

Thread.sleep(1000); // do nothing for 1000 miliseconds (1 second)