time.sleep(1) sometimes runs for 200 seconds under windows

Felipe Almeida Lessa felipe.lessa at gmail.com
Thu Feb 23 19:12:56 EST 2006


Em Qui, 2006-02-23 às 15:26 -0600, Paul Probert escreveu:
>    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!

What about the interpreter? Have you tried sleeping there?

-- 
"Quem excele em empregar a força militar subjulga os exércitos dos
outros povos sem travar batalha, toma cidades fortificadas dos outros
povos sem as atacar e destrói os estados dos outros povos sem lutas
prolongadas. Deve lutar sob o Céu com o propósito primordial da
'preservação'. Desse modo suas armas não se embotarão, e os ganhos
poderão ser preservados. Essa é a estratégia para planejar ofensivas."

  -- Sun Tzu, em "A arte da guerra"




More information about the Python-list mailing list