timer

Is using multiple Timers in Python dangerous?

I am working on a text-based game in Python 3.1 that would use timing as it's major source of game play. In order to do this effectively (rather than check the time every mainloop, my current method, which can be inaccurate, and slow if multiple people are playing the game at once) I was thinking about using the Threading.Timer class. Is...

delphi 7 timer reset

How could one reset the TTimer1 so even ontimer triggers, and the count restarted? The Question is for Design Time command to act on Run-time. ...

Application idle timeout - Want to implement autolock for a specific idle interval

i want to implement auto lock for a specific idle time interval. How can i increase iphone autolock idle time feature programmatically ? Thanks ...

Setting Timer Interval to Infinite

I have a method that links a BO Connection.AliveInterval to a System.Timers.Timer (.NET 2). Some connections are managed to be always connected. Is it OK to set in such a case if (myConnection.AliveInterval == Connection.TimeInfinite) { myTimer.Interval = double.PositiveInfinity; } ? Should I expect that the Timer will throw ...

GWT - CSS GUI Notify User - Browser Issues

Hi guys, wow I couldn't think of a decent title so I went for the acronym approach :-) basically I'm working in GWT and I want to notify the user of a panel changing it's text. I've done this by using a Timer() and CSS public void flashObject() { final Timer flashing = new Timer() { public void run() { flashNewException(); } }; ...

XML is not updated in Windows application

Hi, I have created a windows application, which gets a xml file from the URL and save it on my local machine.In this application a Timer control is set for get the updated XML file from the URL and show the update into label. I have created a setup project and Installed it on another system. Problem is that, The installed application i...

How do I break a loop that is running in different thread using a TimerCallback in C#?

I am writing a game server that has a time limit. I will be accepting input accross a socket until the timer is done. I am using a forever loop to receive data from the client. while(true) { socket.Receive(buffer); } I need to break out of this loop when the time limit ends. Sorry I don't think I am being specific enough. I h...

ASP.NET Auto refresh gridview updatepanel timer

hi Hi I'm new to ajax. I'm working on visual studio 2005. I install the ajax Min4setup and I add the control toolkit to the controls toolbar. I created a new website Ajax-Enabled then I add the existing items (all the page) from the old web site to the new one. I wrote the code below in the page.aspx and the other code in page.as...

background timer working only in one thread C#

hello, I have a kinda awkward problem, I'm working with C# and WPF in .NET 4.0 and what I need is a timer that will create only one thread but it will need to work in the background, so not in the main thread, the problem is using System.Windows.Forms.Timer or DispatchTimer will automatically force it to work on the main thread and be i...

Network receipt timer to ms resolution

My scenario, I'm collecting network packets and if packets match a network filter I want to record the time difference between consecutive packets, this last part is the part that doesn't work. My problem is that I cant get accurate sub-second measurements no matter what C timer function I use. I've tried: gettimeofday(), clock_gettime...

Gracefully stop a Timer callback worker thread

I am using System.Threading.Timer in my Windows service and locking the callback method using Monitor.TryEnter, so it's non-reentrant. Inside the callback, I am looping over some database objects (Linq to SQL entities) and performing some IO tasks. On each iteration of the loop, I am changing some properties of entity to flag it as proce...

Android application Internal timer

How do I keep track of the runtime of an application. ...

Java Timer use on an ASP.NET 2.0 page with Master File

I have found out that sometimes the simplest things you want to do are almost impossible to fund an answer for. I have an ASPX page in ASP.NET V2 programmed in Visual Studio 2005. The ASPX page has a behind code ASXP.VB page and is tied to a .master file. I have two buttons [Button_Process] that will eventually call a program that will e...

How to Display the time elapsed onto UI Screen of the Android

I am writing a app for which i need to display the Time elapsed when user presses a button in UI screen . So please guide me in writing the code in Android. I need to display the time in seconds, mins and hours. Thanks in anticipation. Darshan ...

Timer Efficiency

I am planning to develop a system with tens of thousands of objects in it, which will each have up to 42(but more likely down around 4 or 5) separate actions they will potentially be performing at regular intervals. I also plan to write code that will deactivate the timers until the object comes into use. When idle, the objects will on...

Do Timers work when started from a BackgroundWorker?

I've got a timer that won't trigger the associated function when the time runs out. I did set a Tick event. I set the Interval property to 12000 and I did myTimerObject.Start();. I did however set off this timer in a seperate thread (somewhere in a BackgroundWorker). My theory is that even though the timer seems to start correctly, the ...

How to set a timing task using Timer?

In my application,I want load some data to the database at the midnight each day,how to set it using the Timer? I have thought using: Timer t=new Timer(); TimerTask tt=new TimerTask(){ public void run( //read the data, and push to db ); }; t.schedule(tt,(the next midnight-now time)); However, I am afraid this can only be exec...

Call method on the GUI thread from a timers thread

In my application I am using a timer to check for updates in an RSS feed, if new items are found I pop up a custom dialog to inform the user. When I run the check manually everything works great, but when the automatic check runs in the timers Elapsed event the custom dialog is not displayed. First of all is this a thread issue? (I am...

How to calculate the time taken by one process in objective c?

Hey there, I am fresh to iPhone development and Objective C. Sorry if this question is too stupid.... Here is my problem, I want to calculate the time taken by one of my function. like UIGetScreenImage. Here is the code: -(void)screenCapture{ CGImageRef screen = UIGetScreenImage(); UIImage* image = [UIImage imageWithCGImage:scree...

TimerTasks in Swing

Hi, I'm trying to write a message acknowledgement application where I need to: a) Add every new message on a message queue. Just using an Arraylist for creating a message queue. b) Notify a timertask to expect an acknowledge in 50 sec for the message so make it to either sleep for 50sec or wake up when an acknowledgement is received. W...