Question: Using javascript, I'm trying to do the following. I'll boil this down into it's simplest version.

I'd like to pass a variable from a text field to a URL, and have the URL be visited when the form is submitted.

1. user enters a number into a text input field "123"
2. user clicks the submit button
3. Browser redirects to <http://url.com/?myVariable=123> on click

The other question did not solve my problem because it didn't send a user-inputted variable.

Thank you.

Answer: 
This would be my solution to the problem:

```
from time import sleep

def pumpcheck(timer_in_minutes):
    time_clicked = datetime.datetime.now()
    now = time_clicked
    timeDiff = datetime.timedelta(minutes=int(timer_in_minutes))
    while (time_clicked + timeDiff > now):
        print 'pumpOn'
        now = datetime.datetime.now()
        sleep(2)
    print 'pumpOff'

```

It saves the time when the button was pushed and then checks in a loop, if the time is rfeached, if not, it update the current time, says pump is still on and sleep for a little while to not bloack cpu recources. When the time is reached, it says pumpoff
This sounds like something outside the scope of a single function. Either split the logic into two functions, or use a class to preserve `start_time`