A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-July/112173.html below:

[Python-Dev] time.sleep(-1) behaviour

[Python-Dev] time.sleep(-1) behaviour [Python-Dev] time.sleep(-1) behaviourTim Lesher tlesher at gmail.com
Fri Jul 1 14:17:48 CEST 2011
On Thu, Jun 30, 2011 at 15:13, Ulrich Eckhardt
<ulrich.eckhardt at dominolaser.com> wrote:
> Hi!
>
> This is a request for clarification for the thread "how to call a function for
> evry 10 seconds" from the user mailinglist/newsgroup.
>
>
> The gist is this:
> 1. On Linux/Python 2.6, time.sleep(-1.0) raises an IOError.
> 2. On MS Windows/Python 2.5 or 2.7 this sleeps forever. It seems that
> converting this to a 32-bit integer for Sleep() causes an underflow.

> 3. Is the behaviour under MS Windows acceptable or a bug?

On the Windows side, Sleep(-1) as "infinite" is correct and documented:

http://msdn.microsoft.com/en-us/library/ms686298(v=vs.85).aspx


-- 
Tim Lesher <tlesher at gmail.com>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4