Start with File->Examples->02.Digital->BlinkWithoutDelay
When the LED switches from ON to OFF, take that opportunity to change the 'interval':
// if the LED is off turn it on and vice-versa:
if (ledState == LOW) {
ledState = HIGH;
interval = map(analogRead(pot1), 0, 1023, 50, 500);
} else {
ledState = LOW;
interval = map(analogRead(pot2), 0, 1023, 50, 500);
}
Of course, if you do that without changing anything else you will get an error: "assignment of read-only variable 'interval'". That means "Take the 'const' keyword off of the declaration of 'interval' if you want to be able to change it!"