title: I have some code and I would like some troubleshooting on it
body: <p>My timer won't work properly, since it keeps printing forever, not what I want.</p>
  
  <p>I've already tried re-organizing the script in many ways, but the result is always the same.</p>
  
  <pre><code>import time
  CommandInput = input()
  #execution [uptime]
  def uptime(y):
      while 1 == 1:
          if (CommandInput == "uptime"):
              print(y, " seconds")
          y = y + 1
          time.sleep(1)
  
  
  uptime(9)
  </code></pre>
  
  <p>I wanted to make some sort of "background timer" that kept running from when the script was executed up to when it was closed, and if I typed a certain line in the input it would show the current number it is in. The problem is that it keeps printing the timer forever, for every single number it counts. I wanted to do a one-time thing, where you could wait as much as you want and type the input, which would show the number the timer is in.</p>