Friday, January 21, 2011

leaving a time delay in python

is there any way to leave a time delay between the execution of two lines of code?

  • You can use the sleep() function in the time module. It can take a float argument for sub second resolution.

    from time import sleep
    sleep(0.1) # Time in seconds.
    
    AlberT : is it completely cross plat or there is any kind of issue on Win, for example, I'd have to care about? Thank you in advance.
    From pobk

0 comments:

Post a Comment