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

Discussion in 'Python' started by Paul Probert, Feb 23, 2006.

  1. Paul Probert

    Paul Probert Guest

    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!

    Paul Probert
    University of Wisconsin
    Paul Probert, Feb 23, 2006
    #1
    1. Advertising

  2. 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!
    >
    > Paul Probert
    > University of Wisconsin
    >


    In similar situation I would start to blame the hardware for the
    problem, so below a kind of checklist to go through:

    1. have you changed any hardware?
    2. have you installed new drivers?
    3. have you connected via USB/Firewire/IDE or other interfaces/ports
    etc. some new devices?
    4. have you installed new BIOS?
    5. is your RAM ok?
    6. are you sure there is no CD/DVD in your CD/DVD drive?
    7. are you sure there is no floppy disk in your floppy drive?
    8. are you sure your CPU/motherboard/RAM is not overheating?

    Claudio
    Claudio Grondi, Feb 23, 2006
    #2
    1. Advertising

  3. Paul Probert

    Paul Probert Guest

    Claudio Grondi wrote:

    >In similar situation I would start to blame the hardware for the
    >problem, so below a kind of checklist to go through:
    >
    > 1. have you changed any hardware?
    > 2. have you installed new drivers?
    > 3. have you connected via USB/Firewire/IDE or other interfaces/ports
    >etc. some new devices?
    > 4. have you installed new BIOS?
    > 5. is your RAM ok?
    > 6. are you sure there is no CD/DVD in your CD/DVD drive?
    > 7. are you sure there is no floppy disk in your floppy drive?
    > 8. are you sure your CPU/motherboard/RAM is not overheating?
    >
    >Claudio
    >
    >

    Claudio,
    Thanks for the reply. I should have mentioned, this happens to just
    about every machine in our collection of about 20 machines. Each is of a
    different age, and the hardware is completely diverse. Each has either
    of NT4, win2k, or XP installed. They all belong to our domain

    Paul Probert
    University of Wisconsin
    Paul Probert, Feb 23, 2006
    #3
  4. On 2006-02-23, Paul Probert <> wrote:

    >>In similar situation I would start to blame the hardware for the
    >>problem, so below a kind of checklist to go through:

    >
    > Thanks for the reply. I should have mentioned, this happens to just
    > about every machine in our collection of about 20 machines. Each is of a
    > different age, and the hardware is completely diverse. Each has either
    > of NT4, win2k, or XP installed. They all belong to our domain


    Time to dowload a linux CD then, eh?

    --
    Grant Edwards grante Yow! I am KING BOMBA of
    at Sicily!...I will marry
    visi.com LUCILLE BALL next Friday!
    Grant Edwards, Feb 24, 2006
    #4
  5. On Thu, 23 Feb 2006 15:56:09 -0600, Paul Probert <>
    declaimed the following in comp.lang.python:


    > Thanks for the reply. I should have mentioned, this happens to just
    > about every machine in our collection of about 20 machines. Each is of a
    > different age, and the hardware is completely diverse. Each has either
    > of NT4, win2k, or XP installed. They all belong to our domain
    >

    Any chance they all tend to have slow clocks, and are getting bitten
    by a semi-random NTP time update; my machine tends to run the NTP update
    at 7-day intervals (including time of day), counting from the last
    successful synchronization.
    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
    Dennis Lee Bieber, Feb 24, 2006
    #5
  6. Paul Probert

    Paul Rubin Guest

    Dennis Lee Bieber <> writes:
    > Any chance they all tend to have slow clocks, and are getting bitten
    > by a semi-random NTP time update; my machine tends to run the NTP update
    > at 7-day intervals (including time of day), counting from the last
    > successful synchronization.


    This is a good possibility, that the clock is jumping ahead rather
    than that 200 seconds of actual real time is going during the
    time.sleep call.

    What happens if you replace the time.time call with something that
    reads the current time from an SNTP server (or equivalent) through a
    socket?
    Paul Rubin, Feb 24, 2006
    #6
  7. Paul Probert

    Paul Probert Guest

    Grant Edwards wrote:

    >Time to dowload a linux CD then, eh?
    >
    >
    >

    We are looking at that very seriously. The big hurdle is that we run a
    lot of laboratory hardware that has no support under linux. A world
    where there is no more Kazaa or sasser seems like it would be wonderful,
    though.

    Paul Probert
    University of Wisconsin
    Paul Probert, Feb 24, 2006
    #7
  8. Paul Probert

    Paul Probert Guest

    Dennis Lee Bieber wrote:

    >On Thu, 23 Feb 2006 15:56:09 -0600, Paul Probert <>
    >declaimed the following in comp.lang.python:
    >
    >
    >
    >
    >> Thanks for the reply. I should have mentioned, this happens to just
    >>about every machine in our collection of about 20 machines. Each is of a
    >>different age, and the hardware is completely diverse. Each has either
    >>of NT4, win2k, or XP installed. They all belong to our domain
    >>
    >>
    >>

    > Any chance they all tend to have slow clocks, and are getting bitten
    >by a semi-random NTP time update; my machine tends to run the NTP update
    >at 7-day intervals (including time of day), counting from the last
    >successful synchronization.
    >
    >

    This is now our leading suspect. All the affected machines have
    "abouttime.exe" running as a service, something our sysadmin put in a
    few years ago. We are currently disabling this and now waiting for the
    proof.
    Thanks!

    Paul Probert
    University of Wisconsin
    Paul Probert, Feb 24, 2006
    #8
  9. On Fri, 24 Feb 2006 08:44:49 -0600, Paul Probert <>
    declaimed the following in comp.lang.python:

    > This is now our leading suspect. All the affected machines have
    > "abouttime.exe" running as a service, something our sysadmin put in a
    > few years ago. We are currently disabling this and now waiting for the
    > proof.


    Hmmm, I wonder how compatible that is with WinXP -- since XP already
    has an internet time synch built into the date/time preferences page
    (need admin privs to view).

    Pre-XP may not have had such...
    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
    Dennis Lee Bieber, Feb 24, 2006
    #9
  10. Dennis Lee Bieber schreef:
    > On Fri, 24 Feb 2006 08:44:49 -0600, Paul Probert <>
    > declaimed the following in comp.lang.python:
    >
    >> This is now our leading suspect. All the affected machines have
    >> "abouttime.exe" running as a service, something our sysadmin put in a
    >> few years ago. We are currently disabling this and now waiting for the
    >> proof.

    >
    > Hmmm, I wonder how compatible that is with WinXP -- since XP already
    > has an internet time synch built into the date/time preferences page
    > (need admin privs to view).


    It's easily disabled. I disable it and use NTP for Windows instead on
    machines I control since it works much better.

    > Pre-XP may not have had such...


    Windows 2000 had it too, but there was no GUI to configure it; you had
    to manually edit the registry.

    --
    If I have been able to see further, it was only because I stood
    on the shoulders of giants. -- Isaac Newton

    Roel Schroeven
    Roel Schroeven, Feb 24, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roman Zhovtulya
    Replies:
    5
    Views:
    651
    marcus
    Nov 8, 2004
  2. Paul Probert
    Replies:
    13
    Views:
    446
    Magnus Lycka
    Mar 1, 2006
  3. Paul Probert
    Replies:
    1
    Views:
    345
    Magnus Lycka
    Mar 1, 2006
  4. Michael Tan
    Replies:
    32
    Views:
    965
    Ara.T.Howard
    Jul 21, 2005
  5. Jesse Schoch
    Replies:
    2
    Views:
    131
    Jesse Schoch
    Oct 2, 2003
Loading...

Share This Page