26
if you want a thread to stop doing something, somethimes when you make a endless loop, you don t want the loop to go non stop, because it will also take lots of CPU power, adding a thread.sleep in it will make the loop "take a break" and give the cpu some rest ^^.