Questions tagged as 'timer'

0
answers

Countdown timer but when it reaches zero it resumes?

I have adapted a regressive timer that I found here on the net and adapted to what I want. It is to be used in a cycling event and in a time trial stage where cyclists depart every 2 minutes. It works but I can not loop so that when it reaches z...
asked by 22.05.2015 / 20:57
1
answer

Regex - Replace process time too high

Recently after developing a process, I saw that it was taking an exorbitant 5 ~ 6min to run, something that should take a maximum of 2s, so I started to debug the code with timers to know which process was taking so long to be accomplishe...
asked by 19.08.2015 / 15:36
1
answer

Timer with threads in java

Good evening, guys! I'm developing a multithreaded client / server system. Several clients connect, and when they send the string "Ocupada" 3 times, the code exits the while , starts counting the time and ends the connection with...
asked by 31.07.2016 / 05:32
1
answer

How to disable a TTimer object when you click a button that opens another form and enable it again when the other form is closed?

Good morning. I have a timer running on a form that calls several others. When this form opens another the timer should be stopped and when the form that was opened is closed the timer must be enabled again. However, I can only do this in just o...
asked by 20.11.2018 / 13:34
1
answer

Doubt when using TimerTask

Here is my example of using the TimerTask class and my problem is as follows:   I want to make this routine automatically every 12 hours. Currently nothing is happening, is something missing? And this class just give a tomcat deploy that...
asked by 04.01.2016 / 18:24
1
answer

Execute a function at a given time

Hello, I recently wanted to run a method that sends newsletter-type emails from time to time. I believe I have found the solution, but I can not get through it, which is as follows: /************************************************************...
asked by 16.09.2015 / 20:39
2
answers

How to put a wait time for the code to execute?

I'm playing a little game of memory, more like learning in Java myself. I'll introduce the code and then explain the question. private void testar (ImageView img, int resultado1, int resultado2) { if(resultado1 != resultado2 && r...
asked by 10.11.2018 / 17:40
1
answer

How to use the TIMER class in a method with Math.max and Math.min

I have an ambitious project to create my math game (which I found to be better than a simple calculator) in just a JFrame , with methods only, without using any other class in the package ... With the help of Swing and Netbeans...
asked by 15.04.2016 / 20:09
1
answer

Write on a label when it loads with the form

Well, I have a program that requires me to write using labels, but these only work, and actually write when they are clicked, I would like someone to explain how I should proceed to be able to write then the form is loaded : EDIT: Basically a...
asked by 20.07.2015 / 16:44
2
answers

Determining the time at which function to execute

Example: var horaAtual = new Date(); var horaInicio = new Date("Fri Apr 01 2016 23:30:00"); //Quando(horaAtual == horaInicio) //execute algo... I want a function to run when it reaches an hour already set in my code, without the user need...
asked by 02.04.2016 / 04:22