timer

Time elapses or integer reaches a specified limit - how? (C#)

Hi all, I'm running a C# program (console application, soon to be converted to a Windows Service) where I need to be able to email administrators about errors in the service, but I need it to not send our an email for every error if the number of errors in the last few minutes exceeds 4-5, so it'll only send one email saying there are m...

Visual Studio timer problem

Hello... I couldn't find any explanation for the following problem. Hope you to help me to know the solution... Let's make a new windows appliaction (using any version of VS), and add a button, timer (we modify the interval to become = 10), and a label (with initial text = "0"). write the following code in the timer: label1.Text = ...

When the user has two fingers on the screen and lifts one I want nothing to happen.

enough is enough. like the title says, I'm in a bit of a pickle. so here's the outline of my problem. I have this ship right. It rests in the center bottom of the screen (240,0). When the user touches to the right at a point greater than 240 the ship moves right. And left if the user touches at a point less than 240. HOWEVER this is gr...

How to implement a Timer on JBoss 4.2.2

How can I implement a timer on JBoss 4.2.2 in a vendor independent way. Requirements: trigger logic in a defined interval start the timer at startup no dependencies to JBoss specific libraries / functionality do not use a servlet to start the timer But I see only this possibilites: Implement the interface org.jboss.varia.scheduler...

How does stackoverflow calculates answer accept time limit of 14 mins using jquery?

Can somebody help me to use a timer exactly like stackoverflow's answer accept time limit of 14 mins. How to create a timer in jquery and work with it? EDIT: I am doing an online examination system where the time limit is 60 mins i would like to show an alert of remaining minutes every ten mins.. How to do this in jquery? Or should i m...

Query related to threads in Qt

Hi, i want my application to wait indefinitely till a task gets completed in another thread. How to perform this in Qt. in windows we use waitforsingletonobject but is there any alternative to this. can i get some hints from you guys.. Thanks ...

Memory usage during update label with System.Windows.Forms.Timer control

I have a form with label that is updating by System.Windows.Forms.Timer control every 2 seconds. In task manager i see that memory usage is growing even if program is doing nothing(but label is still updating with latest info, that is memory usage for example) Example code for label text: tlblRam.Text = string.Format("Ram: {0} MB", Conv...

VB.NET Abort an asynchronous method call after timeout

VB.NET 2010, .NET 4 Hello all, I have a System.Timers.Timer object that does some work on its elapsed event: Private Sub MasterTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles MasterTimer.Elapsed MasterTimer.Enabled = False '...work... MasterTimer.Enabled = True End Sub My problem ...

Call function after certain time has elapsed

I'm making a GUI API (for games, not an OS) and would like to implement animated buttons. I'd like to be able to create timed events, but, within the class. example: class TextBox { void changeColor(int color); void createTimedEvent(func* or something, int ticks); void animate() { createTimedEvent(changeColor(red),30);...

Flex 4 timers keep Firing

I'm trying to create a simple flex4 project which involves some timers that trigger other functions. I don't have much experience with Action Script and even less with timer events. Here is a bit of my code it seems to be working for the most part but you lines were I'm adding up the total score (score = score +1;) seems to just keep a...

how to refresh the Label which is inside the Grid view using Java script?

i am displaying time in the label which is inside the grid view. i need to Refresh the label every second. how to do this by Java script.Like Ajax timer. EDIT: OnLoad="setTimeout(window.location.reload();. 1000);" whats wrong with this code or <asp:Label ID="Label2" Width="100px" runat="server" OnLoad="setTimeout(window.location.reload...

blocking/non-blocking timer in C

Hi, This might be an often repeated question, sorry for bringing it back again. I was unable to find a solution :( . I am writing a VM monitoring code in C in Linux. I want to get the read and write count of all the VM's every 10 seconds. Is there any C library that provides this feature(timer alone), blocking/non-blocking timer doesn't...

Setting up an elapsed timer event.

Hi, I need to measure the time difference between when the last packet was received and the new one has arrived. I have tried using the Timer class in C# as such: while (listening) { if (hB != null) { interval = hB.GetHBInterval(); aTimer = new System.T...

how to schedule some code execution in android or: what exactly are daemon threads in android?

hi there! i'm currently working on an app for the android os that requires to fetch data from a remote server from time to time. as this "update" should be carried out even when the actual frontend app is not running, i implemented a remote service that is started on system boot. now i need to schedule a timer to start the update. is ...

VB.NET Trying to modify a generic Invoke method to a generic BeginInvoke method, having unexpected problems

VB.NET 2010, .NET 4 Hello, I have been using a pretty slick generic invoke method for UI updating from background threads. I forget where I copied it from (converted it to VB.NET from C#), but here it is: Public Sub InvokeControl(Of T As Control)(ByVal Control As t, ByVal Action As Action(Of t)) If Control.InvokeRequired Then ...

System.Threading.Timer's Dispose method does not work with ManualResetEventSlim?

I have the following code for a sample console app to simulate a Windows Service. class Program { private Timer timer; private object syncRoot = new object(); private bool stopSignalled = false; private ManualResetEventSlim mre = new ManualResetEventSlim(false); static void Main(string[] args) { Program p...

how to get length of time of visitor in asp.net

I am using asp.net 2.0. I have 5 web pages in my project. I want to calculate the length of time for which visitor view the page. ...

PHP server side timer?

I want to create a single timer that is displayed on my site, I want for it to be synchronous across all clients trying to access it. When a client clicks the "increase" button, I want the timer to add 1 minute to the countdown and I want this change to be reflected for all clients. Is this achievable through PHP? Any tips/advice to g...

Timer in C# windows service not restarting

Hello everyone, I have a windows service that runs four timers for a monitoring application. The timer in question opens a web request, polls a rest web service, and saves the results in a database. Please see the elapsed method below: void iSMSPollTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { i...

How to get the minutes start back at 00 in count Up Timer

Hi am working on this Count Up/Count down Timer however I can't get the minutes to return back to 00 after an hour has elapsed (or reach 60). The 60 remains and it just continues counting the minutes (e.g. 1:61:09). I would like it to show (e.g. 1:01:09) $(document).ready(function() { jQuery.fn.countUpDown = function(settings,to) { ...