I have this piece of code:
import time
def printAtInterval():
print('text')
time.sleep(60 - time.time() % 60)
def getCommand():
command = input()
if command == 'help':
print('something')
while True:
getCommand()
printAtInterval()
The problem with this code is obvious, I can't input anything while the process is waiting for the time to elapse. I'd like to have them both working at the same time.