My timer won't work properly, since it keeps printing forever, not what I want.
I've already tried re-organizing the script in many ways, but the result is always the same.
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) 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.
while True:, notwhile 1 == 1: