servo/potentiometer delay

i just learned how to control a servo using a potentiometer. how to delay the movement given to the potentiometer readings like going to (0 degrees to 90 and then go back from 90 to 30) to a specific time.

i want to be able to turn the potentiometer clockwise and counterclockwise, have a delay of like 4 second and than the servo should move smoothly clockwise and counterclockwise.

i appreciate any input on this matter.

thank you in advance.

i just learned how to control a servo using a potentiometer.

What is the potentiometer value controlling?

can you copy and paste the code here for controlling the servo with the potentiometer (what kind of potentiometer