Hello ,I have searched but its a bit confusing on how a timer is used
I have an animated robot which needs to be moved and i'm doign this throuh a loop.
but i want to delay a single movement so its possible to see the animation

this is the small code where i want to implement the timer

Code:
public void moveRobot()
{
 
	for (int i=0;i<=620;i+=31)
	{
		robot.setLocation(i, 10);
 
		//Thread.sleep(1000);
	}
	for (int i=0;i<=500;i+=31)
	{
		robot.setLocation(500, i);
 
	}
values are just for trial purpose but i wan to know how will i put a timer that every single loop is delayed by 1 seconds ?

thank you