473,542 Members | 10,907 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ



Is there some way to implement a timer in python? I want to open a
process and pipe a log out of it every 10 minutes. How can I do this? Thanks

Jul 18 '05 #1
2 1634
Steve wrote:

Is there some way to implement a timer in python? I want to open a
process and pipe a log out of it every 10 minutes. How can I do this?

Check time.sleep()


G+++ G1 G2+ BW++++ MW++ BM+ Rid+ Arm-- FR+ FW-
#3 D+ ADA N++ W OQP MUSH- BC- CN++ OM P75

"Blehhh! To think that a warrior must become a ... a rat patrol."
-- Dinobot, "Coming of the Fuzors" II
Jul 18 '05 #2
"Steve" wrote:
Is there some way to implement a timer in python? I want to open a
process and pipe a log out of it every 10 minutes. How can I do this?


I think the Timer class in the threading module sounds like exactly what you
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Anks | last post by:
hi I am displaying a digital clock in an applet.I am using Thread.sleep (1000) for counting every second.This works fine some times but some times my clock just slows down or give an interrupted exception .I am not calling Thread.interrupt anywhere in my program. why is it happening? how to fix the problem? Anks
by: Colin Brown | last post by:
Python 2.3.3 Under Windows NT: Negative Int or Real -> sleeps for a long time Under Linux: Returns IOError: Invalid argument I consider both of these unfriendly results and expected the preferable silent time.sleep(0) in much the same way that slicing a string beyond the ends returns an empty string. Colin Brown PyNZ
by: Dave | last post by:
For the life of me, I thought there was a sleep() function in the Standard Library (or something similarly named), but I can't find it. Is it non-existent or, if not, what header is it in? Thanks! Dave
by: Alo Sarv | last post by:
Hi From what I have understood from various posts in this newsgroup, writing event loops pretty much comes down to this: while (true) { handleEvents(); sleep(1); // or _sleep() or nanosleep(), depending on platform }
by: Cider123 | last post by:
I ran into a situation where my Window Service had to process 100,000+ files, when I first noticed I needed to tweak various routines. Everything runs fine, but here's what I ran into: In the routine that loops through the file buffer: for (int i=0;i < _Buffer.length; i++) { // Code here
by: Chris Dunaway | last post by:
According to the docs, calling Thread.Sleep(0) causes the thread to be "suspended to allow other waiting threads to execute." What happens if I call Thread.Sleep(500)? Do other threads not get a chance to execute during this time? What is the difference between the two? I have code that runs in a loop like this: Dim dResetTime As...
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. Note, the Windows task manager shows 2 CPUs on the Performance tab with hyper-threading is turned on. Both Python 2.3.5 and 2.4.3 (downloaded from...
by: Matt Brown - identify | last post by:
Hello, I, as well as suspecting many others, am having an issue when I attempt to enter sleep mode in Vista. If any program is connected to the internet (AOL Instant Messenger for instance), and I go to enter Sleep mode; Vista will automatically leave Sleep mode immediately. I believe this is caused by the fact that Sleep attempts to...
by: Charles Zhang | last post by:
Sleep() function Sleep at lease 1 millisecond, there is a way to make a thread to sleep less than a millisecond? One way I know of is using performance counter which is not really sleep ( loop and check again and again and uses CPU time). Thanks Charles Zhang
by: Tim Golden | last post by:
Lowell Alleman wrote: Well you've certainly picked a ticklish area to run into problems with ;). First, forget about the threading aspects for the moment. AFAICT the smallest program which reproduces your problem is: <code> import signal
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.