time.sleep(1) sometimes runs for 200 seconds under windows
Paul Probert
pprobert at wisc.edu
Thu Feb 23 17:00:40 EST 2006
Benji York wrote:
>Paul Probert wrote:
> > Hi, My app runs in a loop looking for changes in a database, and like
> > a good boy I call time.sleep(1) inside the loop. Unfortunately this
> > sometimes runs for 200 seconds or so, presumably while my OS is
> > calling Bill Gates to tell him what I've been doing. This happens
> > under NT4, W2k, and XP. What do people do to fix this? Thanks!
>
> From the docs for time.sleep:
>
> The actual suspension time may be less than that requested because
> any caught signal will terminate the sleep() following execution of
> that signal's catching routine. Also, the suspension time may be
> longer than requested by an arbitrary amount because of the
> scheduling of other activity in the system.
>--
>Benji York
>
>
Benji,
Thanks, but yes, I had read that before posting. One would think,
though, that the extra 200 seconds is a bit extreme to be blamable on
system scheduling granularity.
I'm starting to think we've got a worm of some kind. If so, its
invisible to our Norton AV corporate.
Paul Probert
University of Wisconsin
More information about the Python-list
mailing list