About 50 results
Open links in new tab
  1. python - How do I make a time delay? - Stack Overflow

    We may think it will "sleep" for 2 seconds for first method and then 3 seconds in the second method, a total of 5 seconds running time of this code. But it will print:

  2. Accurately sleep () for less than a second in python

    Sep 3, 2018 · How can I accurately pause for a set length of time in python. I've tried: import time time.sleep(amount) (amount = a length in time less than 1 second) however this isn't very accurate, …

  3. Delay between for loop iteration (python) - Stack Overflow

    from time import sleep for i in range(10): print i sleep(0.5) #in seconds Implementation Here is a cool little implementation of that: (Paste it in a .py file and run it)

  4. sleep - Correct way to pause a Python program - Stack Overflow

    It seems fine to me (or raw_input() in Python 2.X). Alternatively, you could use time.sleep() if you want to pause for a certain number of seconds.

  5. In Python, how can I put a thread to sleep until a specific time?

    Aug 25, 2020 · time.sleep(NUM) How can I make a thread sleep until 2AM? Do I have to do math to determine the number of seconds until 2AM? Or is there some library function? ( Yes, I know about …

  6. usleep in Python - Stack Overflow

    Apr 6, 2011 · I was searching for a usleep() function in Python 2.7. Does anybody know if it does exist, maybe with another function name?

  7. python - How can I run time.sleep () passing in minutes instead of ...

    Jul 24, 2020 · I am making a timer program and am wondering how I can make time.sleep(#) cause the program to sleep for # minutes instead # seconds?

  8. Python: high precision time.sleep - Stack Overflow

    Jul 31, 2009 · time.sleep() will sleep for half a second. In practice, however, it's unlikely that you will get much more than millisecond precision with sleep because operating systems usually only support …

  9. How do I get my program to sleep for 50 milliseconds?

    Dec 18, 2008 · Might be interesting to know though that 'the function [time.sleep(secs)] sleeps at least secs ' since Python 3.5 according to the documentation.

  10. Is there a way to make a python program wait a few ... - Stack Overflow

    Dec 14, 2022 · 1 I don't know how to make my program wait a few seconds so I can actually read it Is there a wait function in python or is there a module for such? I dont have a way to run it in a window …