I have built an online game system that depends on a timer that records how long it took a player to complete a challenge. It needs to be accurate to the millisecond. Their time is stored in a SQL database.
The problem is that when I use the Timer class, some players are ending up getting scores in the database of less than a second. (w...
I have a timer thread that needs to run at a particular moments of the day to do an incremental replication with a database. Right now it runs at the hour, 15 minutes past the hour, 30 minutes past the hour and 45 minutes past the hour. This is the code I have which is working ok:
public class TimerRunner implements Runnable {
pr...
i have used a mail function. after inserting every record simultaneously from multiple PC.
I have set a timer which ticks for every 2 min. while it ticks it start to check the record and it send the mail. i have used background worker for that.in Bgdworker the mail fn will be called.
private void timer_Startsendingemail_Tick(object se...
How to limit the number of emails to send per tick cycle of the timer in ASP.NET Windows application?
...
This is really annoying me as I have done it before, about a year ago and I cannot for the life of me remember what library it was.
Basically, the problem is that I want to be able to call a method a certain number of times or for a certain period of time at a specified interval.
One example would be I would like to call a method "x" s...
I've got a Windows Service that runs BackgroundWorker's, and I'm wondering if I'm doing the right thing when I stop my Windows Service.
Is it enough to:
Let the BackgroundWorker1_DoWork method complete (I have a while loop in it now, doing some tasks)
Set the variable that holds the reference to the BackgroundWorker, to null
Is the...
Let me explain what I'm trying to do.
I want to make a simple box which counts down numbers at intervals I specify.
For example, I'd like to set it to start at 150, and then I want to set it to drop by 15 every 30 seconds.
Is this possible with AJAX/Javascript? If so, could someone point me in the right direction?
Would really apprec...
Hi!
I have a system where clients can make orders. After making order they have 60 minutes to pay fot it before it will be deleted. On the server side when order is made i create timer and set elapsed time to 60 minutes
System.Timer.Timers timer = new System.Timers.Timer(1000*60*60);
timer.AutoReset = false;
timer.Elapsed += HandleElap...
I have a PHP script that works by calling items from a database based upon the time they were placed in there and it deletes them if they are older than 5 minutes. Basically, I want to now simulate what would happen if this database was being updated regularly.
So I was considering sticking in some code that loads an XML file then goes ...
Hello, commonly on say PHP or other web frameworks getting the total response time is easy, just start the timer at the top of the file and stop it at the end.
In ASP.Net there is the whole Page Lifecycle bit though so I'm not sure how to do this. I would like for this response time recording to take place in a master page and the resp...
ok so im using real basic code for a small game and ive got a timer set up on one room and cant get it to display in the endgame room please help?
this is the code i used
var gameStartTime:uint;
var gameTime:uint;
var gameTimeField:TextField;
gameTimeField = new TextField();
gameTimeField.x = 900;
gameTimeField.y = 50;
addChild(gam...
I need to create a C++/CLI mixed assembly that can schedule future calls into a native DLL with millisecond accuracy.
This will, of course, mean setting a timer (what kind?) for a millisecond or three beforehand, then spinning until the moment and calling the native DLL function.
Based on what I've read, I would guess that the callba...
I'm trying to invoke a method f() every t time, but if the previous invocation of f() has not finished yet, wait until it's finished.
I've read a bit about the available timers (this is a useful link) but couldn't find any good way of doing what I want, save for manually writing it all. Any help about how to achieve this will be appreci...
I have a Windows service that's running all the time, and takes some action every 15 minutes. I also have a client WinForms app that displays some information about what the service is doing. I'd like the forms application to keep itself updated with a recent status, but I'm not sure if polling every second is a good move performance-wis...
How can I call a method every n seconds?
I want to do a slideshow with Swing and CardLayout and every n seconds
it must show a different image calling a different method
...
Hi all!
For some part of my project I need a process-local scheduling system that will allow me to delay method execution on few seconds. I have thousands of “clients” of this system, so using threading.Timer for each delay is a bad idea because I will quickly reach OS thread limit. I've implemented a system that use only one thread for...
Flex 3 ActionScript does not support programmer threads.
But what does flash.utils.Timer do? Does it run in a separate thread or the main loop? If the latter, does that mean that the Timer might not be called if the main loop is in a long-running action?
More generally, what can you tell me about threads running in ActionScript? My on...
I have the following method which is constantly receiving events:
@Override
public void update(EventBean[] newEvents, EventBean[] oldEvents) {
// Process events
}
I want to be alerted when there is a gap of greater than x seconds since the last event. I have had a look at the Java timer classes and the quartz scheduling api but I h...
Hi,
I am running a mainLoop in Cocoa using an NSTimer set up like this:
mainLoopTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/fps target:self selector:@selector(mainloop) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:mainLoopTimer forMode:NSEventTrackingRunLoopMode];
At Program startup I set the ti...
I am working with two timers:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace example
{
public partial class Form1 : Form
{
int i = 0;
int j = 0;
public Form1(...