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 -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -