This delays for 2.5 seconds:
import time
time.sleep(2.5)
Here is another example where something is run approximately once a minute:
import time
while True:
print("This prints once a minute.")
time.sleep(60) # Delay for 1 minute (60 seconds).
More Related Contents:
- How can I make a time delay? [duplicate]
- How do I print a word on a line, and after every second it prints the word with one extra letter on the end of it every time
- How accurate is python’s time.sleep()?
- tkinter and time.sleep
- How do I get my program to sleep for 50 milliseconds?
- time.sleep — sleeps thread or process?
- How can I get millisecond and microsecond-resolution timestamps in Python?
- Python time.sleep() vs event.wait()
- implement time delay in c
- time.sleep() and BackGround Windows PyQt5
- asyncio.sleep() vs time.sleep() in Python
- Python & Selenium: Difference between driver.implicitly_wait() and time.sleep()
- Upper limit in Python time.sleep()?
- Correct way to pause a Python program
- Sleep for exact time in python
- Discord Py on_message bot=False blocked?
- error when applying function to a series object
- How do I profile memory usage in Python?
- Prepend line to beginning of a file
- What does a b prefix before a python string mean?
- RGB Int to RGB – Python
- How to implement a good __hash__ function in python [duplicate]
- Setting property causes maximum recursion depth exceeded
- How to remove duplicates only if consecutive in a string? [duplicate]
- Efficient way to take the minimum/maximum n values and indices from a matrix using NumPy
- django best approach for creating multiple type users
- How to re-raise an exception in nested try/except blocks?
- Is it possible to express a platform-specific dependency in setup.py without building platform-specific versions of my egg?
- pygame error, No video mode has been set
- Multi Index Sorting in Pandas