473,397 Members | 1,960 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,397 software developers and data experts.

system.timers.timer: how to check if previous procedure is complete?

i am using system.timers.timer to perform a webrequest and populate a
datatable with the returned values.

Occasionaly if my connection becomes slow it takes longer for the
webresponse and dataprocessing than the interval of the timer.

the program stops responding and then in spurts will hammer the
website with the webrequests in the queue.

How can check in the timer procedure whether there exists in the
threadpool a instance of itself currecntly running? ... if you see
what i mean. thankyou
Jun 27 '08 #1
2 1264
mg******@orange.net wrote:
i am using system.timers.timer to perform a webrequest and populate a
datatable with the returned values.

Occasionaly if my connection becomes slow it takes longer for the
webresponse and dataprocessing than the interval of the timer.

the program stops responding and then in spurts will hammer the
website with the webrequests in the queue.

How can check in the timer procedure whether there exists in the
threadpool a instance of itself currecntly running? ... if you see
what i mean. thankyou
I think the normal approach for this situation is to disable the timer at the
beginning of the event procedure, and re-enable it at the end. That way no timer
events pile up behind it.
Jun 27 '08 #2
On 17 Jun, 04:13, "Steve Gerrard" <mynameh...@comcast.netwrote:
mgnll...@orange.net wrote:
i am using system.timers.timer to perform a webrequest and populate a
datatable with the returned values.
Occasionaly if my connection becomes slow it takes longer for the
webresponse and dataprocessing than the interval of the timer.
the program stops responding and then in spurts will hammer the
website with the webrequests in the queue.
How can *check in the timer procedure whether there exists in the
threadpool a instance of itself currecntly running? ... if you see
what i mean. thankyou

I think the normal approach for this situation is to disable the timer at the
beginning of the event procedure, and re-enable it at the end. That way notimer
events pile up behind it.
thankyou stevey G, ill give that a go.
Jun 27 '08 #3

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

Similar topics

3
by: Peter Johnsson | last post by:
How come the eventhandler for the timer's elapsed time event is called over and over again, even though the AutoReset property is set to false, if you assign a new value to the timer objects...
2
by: linesh.gajera | last post by:
Hi Guys, I am creating a Windows service that call a routine at given interval. Once routine is complete, windows service should wait for 5 minutes and then call the routine again. I was using...
9
by: Mark Rae | last post by:
Hi, I've seen several articles about using System Timers in ASP.NET solutions, specifically setting them up in Global.asax' Application_OnStart event. I'm thinking about the scenario where I...
5
by: Michael C# | last post by:
Hi all, I set up a System.Timers.Time in my app. The code basically just updates the screen, but since the processing performed is so CPU-intensive, I wanted to make sure it gets updated...
1
by: melanieab | last post by:
Hi, I'm have a datagrid, and I'm trying to have a tooltip pop up if a cell has been hovered on for 2 seconds. I was thinking of using DataGrid.Hover, but then decided to try this instead: ...
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
4
by: Ben | last post by:
Hello everybody I got confused by this problem for which I don't have a logical explanation. There is a Thread (ThreadA) which receives Events from another system thread (ThreadS). ThreadA then...
7
by: RobKinney1 | last post by:
Hello, Wow...I have one for you all and hopefully I am not understanding this timer object correctly. I have a timer setup that pulses a connection through a socket every 60 seconds. But it...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
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...

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.