Have a look at threading.Timer
. It runs your function in a new thread.
from threading import Timer
def hello():
print "hello, world"
t = Timer(30.0, hello)
t.start() # after 30 seconds, "hello, world" will be printed
More Related Contents:
- How do I get time of a Python program’s execution?
- Display the time in a different time zone
- How to wait some time in pygame?
- How do I check the difference, in seconds, between two dates?
- Making a countdown timer with Python and Tkinter?
- time.sleep — sleeps thread or process?
- High-precision clock in Python
- How do I get the current time in milliseconds in Python?
- How to run a function periodically in python
- Splitting timestamp column into separate date and time columns
- Python speed testing – Time Difference – milliseconds
- How do I change the file creation date of a Windows file?
- Week number of the month?
- Difference between Python datetime vs time modules
- How do you calculate program run time in python? [duplicate]
- Using %f with strftime() in Python to get microseconds
- Python get current time in right timezone [duplicate]
- Convert string into datetime.time object
- In python, how to check if a date is valid?
- How can I parse free-text time intervals in Python, ranging from years to seconds?
- How to add hours to current time in python
- How to compare times of the day?
- Get POSIX/Unix time in seconds and nanoseconds in Python?
- How to get the seconds since epoch from the time + date output of gmtime()?
- Get part of day (morning, afternoon, evening, night) in Python dataframe
- Accurate timing of functions in python
- Equivalent to GetTickCount() on Linux
- Use Python to find out if a timezone currently in daylight savings time [duplicate]
- Upper limit in Python time.sleep()?
- Python logging: use milliseconds in time format