- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I make a time delay in Python?
In order to introduce delay of definite interval, we can use sleep() function that is available in time module of Standard Python library. The sleep() function takes an integer number corresponding to seconds as an argument.
In following example, current time is first displayed and then the execution is paused for 10 seconds using sleep() function.
import time print ("current time : ",time.ctime()) time.sleep(10) print ("after 10 sec : ",time.ctime())
- How can I make one Python file run another?
- How can I make a horizontal ListView in Android?
- Set new delay time in a MySQL column
- Generation of time delay in 8085
- How can I make jQuery animations smoother?
- How can I make a simple 3D line with Matplotlib?
- How can I apply an offset on the current time in Python?
- How can I make my custom objects Parcelable?
- How can I make my custom objects Serializable?
- How can I make my layout scroll vertically?
- How can I make sense of the else clause of Python loops?
- How can I make a table in MySQL called “order”?
- How can I remove a button or make it invisible in Android?
- How can I make a scatter plot colored by density in Matplotlib?
- How can I make my layout scroll vertically in Android?