I have a flex application that repeatedly polls a remote XML file to detect changes, but I've found that once the file hits a certain size, the poll blocks the UI and makes the page unresponsive for a short time.
Is there any way to ensure that the call made to the server or the event from the flash.utils.Timer class runs asynchronousl...
What is the difference between having multiple Timers vs multiple Threads?
I have a Windows service that runs in the background. There are about ten "Sites" in a database that get loaded on init. Each site gets initialized in its own Timer object, and then the Timer executes code on an interval for each site. The code executed is fro...
Hello.
I'm using Python and PyGTK. I'm interested in running a certain function, which gets data from a serial port and saves it, every several minutes.
Currently, I'm using the sleep() function in the time library. In order to be able to do processing, I have my system set up like this:
import time
waittime = 300 # 5 minutes
while(1)...
I have a modal popup extender tied to a asp:panel control that I want to show when the timer on an asp:updatepanel reloads executes the tick method. The tick method calls another method that checks for specific conditions and if all the conditions are met, I call:
ClientScript.RegisterClientScriptBlock(this.GetType(), "key", "$find('mo...
I'm starting to use GameKit for a p2p project, and I want to call a function at the same time on both clients. Assuming their clocks aren't set to exactly the same time, how can I call NSTimer or whatever so my function is called at the same time on both clients?
Thanks!
...
Hi,
I have the following scenario with ASP.NET 2.0. I have declared an atlas:timer as follows in my .aspx page:
<atlas:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" Interval="3000"
Enabled="false"> </atlas:Timer>
I also have a button on a form which when clicked launches a new System.Threading.Thr...
Since performance of string concatenation is quite weak in VB6 I'm testing several StringBuilder implementations. To see how long they're running, I currently use the built-in
Timer
function which only gives me the number of seconds that have passed after midnight.
Is there a way (I guess by importing a system function) to get somet...
Hello,
I am running a windows service and using a loop and Thread.Sleep to repeat a task, would it be better to use a timer method?
If yes a code example would be great
I am currently using this code to repeat
int curMinute;
int lastMinute = DateTime.Now.AddMinutes(-1).Minute;
while (condition)
{
curMinute = DateTime.Now.Mi...
Hi,
Related to TimerService, can I define two Timer instances and bind each timer to a specific (different) method annotated @Timeout in the same EJB?
Thanks,
Rod
...
In Flex/ActionScript 3, is there a better way to monitor the date/time to determine if the date has changed to the next day by creating a timer that dispatches every minute?
...
While testing Pythons time.clock() function on FreeBSD I've noticed it always returns the same value, around 0.156
The time.time() function works properly but I need a something with a slightly higher resolution.
Does anyone the C function it's bound to and if there is an alternative high resolution timer?
I'm not profiling so the Tim...
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JPanel;
import javax.swing.Timer;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartMouseEvent;
import org.jfree.chart.ChartMouseListener;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.entity.ChartEntit...
I would like to write a windows batch file for the purpose of renaming a file every 25 seconds. I would also like the batch file to terminate after 300 seconds have passed. How would I go about doing this? Here is what I have thusfar.
START
RENAME test.g test.go
SLEEP 25
RENAME test.go test.g
GOTO START
...
what is a difference between System.Windows.Forms.Timer() and System.Windows.Threading.DispatcherTimer() ? In which cases, we should use them? any best practices ?
...
I use UpdatePanel with DataList element inside. I want to update the contents from DB every 10 secunds. I noticed that updating occures only after the postback. I did the code like
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" E...
Hi all,
we have recently added a new feature to our software - preview generation for documents that are uploaded and stored on the server. We did this the following way:
The user uploads a document;
Once the user opens the document information card, the preview for the recently uploaded document is issued (the info regarding the prev...
The following piece of code is used to print the time in the logs:
#define PRINTTIME() struct tm * tmptime;
time_t tmpGetTime;
time(&tmpGetTime);
tmptime = localtime(&tmpGetTime);
cout << tmptime->tm_mday << "/" <<tmptime->tm_mon+1 << "/" << 1900+tmptime->tm_year << " " << tmptime->tm_hour << ":" << tmptime->tm_min << ":" << tmptim...
Hello, recently I have had to program some applications that require large amounts of timed tasks to occur. However, I'm afraid to create so many timers because I haven't been able to figure out how they are handled by Java. Is there a problem with starting large quantities of scheduled tasks? If so, what is the better alternative?
...
If I call Threading.Timer.Change() twice in a row, when will the thread next run?
For example:
myTimer.Change(5000, Timeout.Infinite);
// Only 2 seconds pass.
myTimer.Change(5000, Timeout.Infinite);
After this, will the thread next run in 3 seconds or 5 seconds?
I hope the answer is the latter, that the timer is reset with each call...
I need to display a time duration on a few of my Activities within the application. The timer starts when one of the Activity starts. Should I use service for the timer? is this the best way? or should I start thread from one of the Activity?
...