-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I need high-resolution (more accurate than 1 millisecond) timing in my application. The waitable timers in Windows are (or can be made) accurate to the millisecond, but if I need a precise periodicity of, say, 35.7142857141 milliseconds, even a waitable timer with a 36 ms period will drift out of…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In a VSTO add-in I'm developing, I need to execute a method with a specific delay. The tricky part is that the method may take anywhere from 0.1 sec to 1 sec to execute. I'm currently using a System.Timers.Timer like this:
private Timer tmrRecalc = new Timer();
// tmrRecalc.Interval = 500…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
So I have a TimerTask task calling a function onTimerComplete() in its run()
onTimerComplete() looks something like this:
private void onTimerComplete(){
myFunc1();
myFunc2();
}
I make a Timer t and I schedule the TimerTask with t.schedule(task, 2000);
The problem is, when the timer is up…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
So I have a TimerTask task calling a function onTimerComplete() in its run()
onTimerComplete() looks something like this:
private void onTimerComplete(){
myFunc1();
myFunc2();
}
I make a Timer t and I schedule the TimerTask with t.schedule(task, 2000);
The problem is, when the timer is up…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi All. When reading data from a potentially slow website, I want to ensure that get_response can not hang, and so added a timer to timeout after x seconds. So far, so good. I then read http://ph7spot.com/musings/system-timer which illustrates that in certain situations timer.rb doesn't work due to…
>>> More