[Python] Python's time.sleep() hangs

Discussão em 'Python' iniciado por Stack, Julho 30, 2025.

  1. Stack

    Stack Membro Participativo

    I have a test script that sleeps for a random amount of seconds, between 1 and 180 seconds. The test program would hang for more than 3 minutes.

    So I changed the code so that it would sleep for 60 seconds (1 minute) and ran the script. After 20 hours (!!!), the code is still hanging on time.sleep().

    The code is

    downTime = 60
    time.sleep(downTime)


    Why does Python hang forever on a time.sleep(60)?

    Continue reading...

Compartilhe esta Página