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

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -