0

Hi
Im looking for a time delay code so my script runs to certain line waits for the time specified then continues.Ive found some but they seem to long and complicated. any ideas or links, books ect...

Many Thanks

HlA91

STAY COOL AND DONT GET STRESSED!:cool:

3
Contributors
2
Replies
6
Views
10 Years
Discussion Span
Last Post by Mouche
0

Function sleep(seconds) from module time is pretty much the best. Remember seconds is a float so you can delay 0.5 seconds.

import time

print "Hello ..."
time.sleep(2.5)  # wait 2.5 seconds
print "... there!"
1

sorry, posted late. ;)

If you import the time module, you can use the sleep function.

time.sleep(seconds)

ex: time.sleep(5) waits five seconds

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.