About 470,000 results
Open links in new tab
  1. Python sleep(): How to Add Time Delays to Your Code

    In this tutorial, you'll learn how to add time delays to your Python programs. You'll use decorators and the built-in time module to add Python sleep() calls to your code. Then, you'll discover how time delays work with threads, asynchronous functions, and graphical user interfaces.

  2. time.sleep() in Python - GeeksforGeeks

    Aug 18, 2022 · Python time sleep () function suspends execution for the given number of seconds. sec : Number of seconds for which the code is required to be stopped. Returns : VOID.

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

    Nov 1, 2024 · There is a module called 'time' which can help you. I know two ways: Sleep (reference) asks the program to wait, and then to do the rest of the code. time.sleep(0.05) # 50 milliseconds... make sure you put time. if you import time! The second way doesn't import the whole module, but it just sleep.

  4. Python sleep() (With Examples) - Programiz

    The sleep() method suspends the execution of the program for a specified number of seconds. In the tutorial, we will learn about the sleep() method with the help of examples.

  5. Using the Python time.sleep() Method - AskPython

    Mar 12, 2020 · The Python time.sleep() method is used to halt the execution of the current program/thread for a given amount of time. The current program/thread is essentially doing nothing in this time period, so it “sleeping” for that amount …

  6. Python Sleep() Method | Docs With Examples - Hackr

    Mar 5, 2025 · The Python sleep() function pauses program execution for a specified time. Learn how to use the time.sleep() method with examples, including loops, countdown timers, and handling delays efficiently.

  7. Python Sleep(): What It Is and When to Use It - Stackify

    Dec 3, 2024 · Python sleep() is a function that lets developers introduce intentional pauses in code execution. Whether you’re a beginner or an experienced Python developer, understanding how to effectively use sleep() can significantly improve the quality and efficiency of your code.

  8. Python sleep() | Function Guide (With Examples)

    Aug 28, 2023 · TL;DR: How Do I Make a Python Program Sleep? The answer is simple: Use the sleep() function from Python’s time module. Here’s a quick example: print('Hello, World!') # 'Hello, World!' This snippet of code will cause the program to …

  9. Using the Python sleep() Method – A Comprehensive Guide

    Nov 1, 2023 · The sleep() function provides a lightweight way to pause and timed control flow in Python programs. By suspending execution for a specified number of seconds, it enables throttling, retries, timers, thread coordination, simulations, and more.

  10. Mastering `sleep` in Python: A Comprehensive Guide

    Jan 29, 2025 · This blog post will dive deep into the fundamental concepts of `sleep` in Python, explore its usage methods, discuss common practices, and provide best practices to help you make the most of this powerful feature.

  11. Some results have been removed
Refresh