estoy tratando de implementar un fragmento de código que espera un cierto tiempo antes de permitir que un usuario haga algo
he estado usando la ayuda de Internet y un libro de codificación que tengo
start=time.strftime("%H:%M")
if time.strftime("%H:%M")==("start"+"1%M"):
print("done")
i would like the output to force a player to wait for some time then be able to carry on
Solución del problema
Use the time.sleep(num_seconds)
command:
import time
...
# do some things
time.sleep(5) # wait for 5 seconds doing nothing
# continue doing other things
No hay comentarios:
Publicar un comentario