473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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
7 1490
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bart Nessux | last post by:
am I doing this wrong: print (time.time() / 60) / 60 #time.time has been running for many hours if time.time() was (21600/60) then that would equal 360/60 which would be 6, but I'm not getting...
6
by: Stefan Behnel | last post by:
Hi! The logging module nicely prepends each line with a formatted date. However, I'm not interested in the actual date but only in the number of milliseconds that passed since the start of the...
77
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the...
9
by: HL | last post by:
I am using VS 2005 Beta - C# Problem: The Timer fires a few milliseconds before the actual Due-Time Let's say a timer is created in the following manner: System.Threading.Timer m_timer = null;...
3
by: al | last post by:
Greetings, I have a simple page with this code in Page_Load event(vb.net): Response.Buffer=True Response.write("begin test") Response.Flush()
5
by: Sinan Nalkaya | last post by:
hello, i need a function like that, wait 5 seconds: (during wait) do the function but function waits for keyboard input so if you dont enter any it waits forever. i tried time.sleep() but when...
4
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
8
by: Theo v. Werkhoven | last post by:
hi, In this code I read out an instrument during a user determined period, and save the relative time of the sample (since the start of the test) and the readback value in a csv file. #v+...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.