By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Feb 23 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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
Feb 23 '06 #2

P: n/a
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

Feb 23 '06 #3

P: n/a
On 2006-02-23, Paul Probert <pp******@wisc.edu> 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!
Feb 24 '06 #4

P: n/a
Dennis Lee Bieber <wl*****@ix.netcom.com> 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?
Feb 24 '06 #5

P: n/a
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

Feb 24 '06 #6

P: n/a
Dennis Lee Bieber wrote:
On Thu, 23 Feb 2006 15:56:09 -0600, Paul Probert <pp******@wisc.edu>
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

Feb 24 '06 #7

P: n/a
Dennis Lee Bieber schreef:
On Fri, 24 Feb 2006 08:44:49 -0600, Paul Probert <pp******@wisc.edu>
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
Feb 24 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.