timer

Starting timer from another project

I have to projects in my .net windows forms, in one form(1st Project) i have timer control already running. On some request i want to start that timer from the form1 of (second project). If we are creating new object in second project for the 1st project(Which is currently in running thread) we will not be able to start the timer for th...

Timer running status in windows forms

In Windows Forms, How to check whether the timer is running or stopped? ...

Accessing running task scheduled with java.util.Timer

I'm working on a Java project where I have created a class that looks like this (abridged version): public class Daemon { private static Timer[] timerarray=null; private static Daemon instance=null; protected Daemon() { ArrayList<Timer> timers = new ArrayList<Timer>(); Timer t = new Timer("My application"); t.schedule...

Accessing an Internal Function in setInterval

(function($) { $.fn.myPlugin = function(options) { var _this; var timer1; var foo = function(n) { if (timer1 != null) return; // in action timer1 = setInterval("bar("+n+")", 500); }; var bar = function(n) { ... if ( ... ) cle...

Behaviour of System.Timer when Interval property changed

I have a System.Timer setup to trigger an event every day at 2AM. If the process the timer starts fails then I want the timer to be reset to run every 15 minutes until the process completes succesfully. // this is how the timer is set up. // this is working correctly. double startTime = milliseconds_of_hour_to_start. Timer = new Syst...

Timer Job from a SPWeb

Hi, I guess starting a timer job from within the code required Farm admin credetials. However, i need to start a timer job from a web part that will be used in any site. Now when i try to start the job it gives me access denied error and obviously so as app pool identity is not farm admin. Any ideas on how to resolve this issue? Thanks...

What is a simple way to add a timer to a method

The following is in C#. I'm trying to do something very simple (I think). I have a method that loads an XML document XDocument doc = XDocument.Load(uri); , but I don't want to tie up pc resources if there are issues (connectivity, document size, etc.). So I'd like to be able to add a timeout variable that will cut the method off af...

Javascript timers

I'm starting on a javascript MMORPG that will actually work smoothly. Currently, I created a demo to prove that I can move characters around and have them chat with each other, as well as see eachother move around live. http://set.rentfox.net/ Now Javascript timers are something I have not used extensively, but from what I know, corr...

Force timer's tick (including async behavior)

On my application I have a timer that checks for configuration updates from the server in a few minutes intervals. The configuration retrieval is a pretty time consuming process, so I want to force the timer's "Tick" event, but I cannot just call the timer_tick(bla,bla,bla) because it will execute synchronously. Is there a simple way t...

How to pause the timer in c#?

I have a timer in my code and the interval is 10s When the timer elapsed, I will do some checking, and it may takes more than 10s for checking and some update jobs. However, if I didn't stop the timer, seems the checking will execute every 10s ... If I call the stop(), seems the timer cannot be start again ... ie something like: p...

Jquery hover to only have effect for certain amount of time

Hi, I'm using a jquery hover effect but would only like the effect to last for around a second when rolled over....ie user rolls over image, it changes for a second, then reverts back to the original image. $(document).ready(function(){ $(function() { $('.rollover').hover(function() { var currentImg = $(this).attr('src...

ASP.NET Timer Event

protected void SubmitButtonClicked(object sender, EventArgs e) { System.Timers.Timer timer = new System.Timers.Timer(); --- --- //line 1 get_datasource(); String message = "submitted."; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "popupAlert", "popupAlert(' " + message + " ');", tru...

Java's Swing seems to be changing the layout from Card Layout

I am having some pretty strange symptoms with JPanels and CardLayout. Essentially, I have cards which act as "pages" since I can only hold 12 cells on the grid, and I display each page as a card, and clicking -> and <- buttons change pages accordingly (or that's the idea). Because this data is representing a changing model, every five se...

JQuery Plugin - Record Time Spent on Webpage

I want to record time spent on webpages. Is there an appropriate JQuery plugin written for this? I could then record the value of the timer in a variable and insert to a database. JJH ...

Can Stopwatch be used in production code?

Hi, I need an accurate timer, and DateTime.Now seems not accurate enough. From the descriptions I read, System.Diagnostics.Stopwatch seems to be exactly what I want. But I have a phobia. I'm nervous about using anything from System.Diagnostics in actual production code. (I use it extensively for debugging with Asserts and PrintLns etc...

CreateTimerQueue for linux

Anyone know if there is any function similar to CreateTimerQueue on linux? Or do I have to make my own. ...

Minimal example wanted showing texview incrementing a count on a timer?

In c it would be: while(1){ i++; printf("%d \r",i); } I assume the textview and the variable and the timer get created in oncreate, then there is a timer handler with an increment and a settext and a sleep? Seeing how to do this in androidese would really clarify things I think. Thanks. ...

JavaScript - Does the browser keep track of active timer IDs?

Does the browser keep track of active setInterval and setTimeout IDs? Or is this solely up to the developer to keep track of? If it does keep track of them, is it accessible via the BOM? ...

run a function every x seconds in c++

I'm trying to build a feed reader in C++, so I need the program to check for new feeds intermittently. However, the user needs still to be able to interact with the program, so the suggestion that I seem to keep finding, to have the system wait, doesn't work for me. Can anyone suggest a better solution, say a timer that runs in the backg...

Singletons with TimerManager on WebSphere Cluster

How can I get a timer task on a WebSphere cluster to execute once and only once? I know this is possible on other app servers but can't figure out how to do this in WebSphere. ...