timer

Why does my entire page reload in Chrome and Firefox when using asynchronous UpdatePanel postbacks?

Being a bit perplexed about this issue by now, I hope some of you gurus can shed some light on my problem... I've developed a AJAX-enhanced website, which has been running fine in IE, Chrome and Firefox for a year or so. I use a Timer-control to check for incoming messages every 30 seconds, and this updates an UpdatePanel showing potent...

Algorithm for count-down timer that can add on time

I'm making a general timer that has functionality to count up from 0 or count down from a certain number. I also want it to allow the user to add and subtract time. Everything is simple to implement except for the case in which the timer is counting down from some number, and the user adds or subtracts time from it. For example: (m_cloc...

Stop a stopwatch

I have the following code in a JPanel class which is added to a another class (JFrame). What I'm trying to implement is some sort of a stopwatch program. startBtn.addActionListener(new startListener()); class startListener implements ActionListener { public void actionPerformed(ActionEvent e) { Timer time = new Timer(); ...

What will happen if the code can't finished on time...

If I set a timer to execute a code every 3 seconds. If the code isn't finished in 3 seconds, what will happen? The computer will terminal the code or wait for the code finish or continue the timer, and execute the code with the unfinished code concurrently. If the computer will execute the code with the unfinished code concurrently, wha...

UIDatePickerView as Timer with more values

The UIDatePicker with it's mode set on "Timer", only has values from 0 to 23 hours. I'd like to have more hours (like, up to 48 hours). It also shows a nice "floating" text next to the number on the selected row. I can actually "imitate" the "floating" hours effect, by adding a label on top of the UIPickerView, but I'd lose the second c...

How to calculate timer value to use to generate a timer IRQ

I'm using an ARM7 core microcontroller. I'm unsure of how to calculate what T1LD register value to load to the timer to allow it to generate an IRQ every x ms. The only information that I can find in the documentation states "The timer interval is calcualted as follows" Interval = ((TxD)xPrescalar)/Source Clock I'm not sure...

How to create a JQuery Clock / Timer

I have a simple quiz application and I want display a nice timer / clock at the top of the page which shows the user how long they've been going for. (If I could somehow show them a timer for Total Quiz Time and also a second one for This Question Time that would be even cooler but I should be able to figure out how to do myself that onc...

Timer in a Windows service - not really working?

I have a Windows NT Service in C# which basically wakes up every x seconds, checks to see if any mail notifications need to be sent out, and then goes back to sleep. It looks something like this (the Timer class is from the System.Threading namespace): public partial class MyService : ServiceBase { private Timer _timer; private...

Tab Page launching a timer

I have a project that uses a System.Timers.Timer to update the position of motors. I am adding 3 more motors and would like to control each of them the same way as the first. I tried moving my controls to a Tab Control but my update timers are not triggering. I made the UpdateTimer.SynchronizingObject = TheMainForm; Because if I t...

IPhone: different system timers??

I have been using mach_absolute_time() for all my timing functions so far. calculating how long between frames ect. I now want to get the exact time touch input events happen using event.timestamp in the touch callbacks. the problem is these two seem to use completely different timers. sure, you can get them both in seconds, but the...

Javax Swing Timer Help

Hello Guys, I am having some problems concerning starting javax.swing.Timer after a mouse click. I want to start the timer to perform some animation after the user clicks on a button but it is not working. Here are the code snippets: public class ShowMe extends JPanel{ private javax.swing.Timer timer; public ShowMe(){ timer =...

System.Timers.Timer event handlers threading mode

Hello gurus Can't find the answer to my question in MSND : Does Timer class guarantees that all handlers subscribed to Elapsed event will be executed on the same threadpool thread ? If yes, will they be executed according the order in wich they were added to Elapsed event ? Thanks ...

Delphi: OnTimer event of my own Timer never happens

I need a Timer in a 'no form' Delphi unit (there's still a main unit with a form), so I do this: unit ... interface type TMyTimer = Class(TTimer) public procedure OnMyTimer(Sender: TObject); end; var MyTimer: TMyTimer; implementation procedure TMyTimer.OnMyTimer(Sender: TObject); begin ... end; initialization MyTime...

Windows service installed successfully but not responding after started.

I have a windows service written in C#, .Net framework 2.0. I installed it on three machines and it worked fine but on one machine (with .Net framework 2.0) the setup has installed the service successfully but the service is not responding after I start it. I check for this by checking whether a log file is created at a specific path ins...

WPF Dispatcher timer tick freezes my application

I've got a little problem using WPF Dispatcher Timer. On each timer tick my application freezes for a moment (until timer tick method finishes). This is my code: private DispatcherTimer _Timer = new DispatcherTimer(); _Timer.Tick += new EventHandler(_DoLoop); _Timer.Interval = TimeSpan.FromMilliseconds(1500); _Timer.Start(); Is there...

C# Windows Service Intermittent Method Call

Scenario I have a C# Windows Service that essentially subscribes to some events and if anything is triggered by the events, it carries out a few tasks. The Thing... ....is that these events are monitoring processes, which I need to restart at certain times of the day. Question What's the best way I can go about performing this task ...

Windows.Forms.Timer instance and UI threads

I have a custom control whose primary purpose is to draw data. I want to add a ScheduleUpdate(int milliSeconds) method to the control which will force an update X milliseconds from now. Since this is all GUI land, I should be using a Windows.Forms.Timer, but how does this timer instance know which thread it belongs to? What if Schedule...

AS3: Synchronize Timer event to actual time?

I plan to use a timer event to fire every second (for a clock application). I may be wrong, but I assume that there will probably be a (very slight) sync issue with the actual system time. For example the timer event might fire when the actual system time milliseconds are at 500 instead of 0 (meaning the seconds will be partially 'ou...

C# how to use timer ?

Hi. I made a student check_list program thats using bluetooth adapter searches students cell phones bluetooth and checks that are they present or not and saves students informtion with date in table on data base.all them works gereat.But I want to make it automatic that I will put my program on some computer like works as an server and p...

java timer and socket problem

Hi there, I'm trying to make a program which listens to the client input stream by using socket programming and timer but whenever timer executes.. it gets hanged Please help me out here is the code... private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: try { S...