Making a timer in Python -


what want do, example:

print like, "welcome program" create timer x seconds, after x seconds have passed, next thing, prints else like, "to start type hello"

the time library useful:

>>> import time >>> print "hello" hello >>> time.sleep(5) # 5 second pause >>> print "done" done 

that pause execution of program 5 seconds, during time.sleep(). if want other things during pause, becomes more complicated question, , should threading


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -